File pcp-2.5.0-ndbm.diff of Package pcp

===========================================================================
Index: src/include/impl.h
===========================================================================

--- a/src/include/impl.h	2006-05-25 12:27:12.000000000 +1000
+++ b/src/include/impl.h	2006-05-25 12:27:12.000000000 +1000
@@ -16,7 +16,7 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <netdb.h>
-#if defined(HAVE_NDBM_H)
+#if (defined __sgi) && (defined mips) &&  (defined HAVE_NDBM_H)
 #include <ndbm.h>
 #endif
 #include <time.h>
@@ -654,7 +654,7 @@
 bozo - unknown size of long !!!
 #endif
 
-#ifdef HAVE_NDBM_H
+#if (defined __sgi) && (defined mips) &&  (defined HAVE_NDBM_H)
 /*
  * If you use help files created via "newhelp -v1" and ndbm(3B), then
  * this is the key you should use, i.e. dptr -> __pmHelpKey and
@@ -664,6 +664,8 @@
     int		ident;		/* PMID or InDom */
     int		type;
 } __pmHelpKey;
+
+extern char *__pmGetText(DBM *, int, int);
 #endif
 
 /*
@@ -676,8 +678,6 @@
 #define PM_TEXT_PMID	4
 #define PM_TEXT_INDOM	8
 
-extern char *__pmGetText(DBM *, int, int);
-
 /*
  * Quick-and-dirty pool memory allocator ...
  */