Subject: sysutil/fam Solaris
To: None <tech-pkg@netbsd.org>
From: Gilles Dauphin <Gilles.Dauphin@enst.fr>
List: tech-pkg
Date: 08/30/2005 12:35:51
here is a wished patch for sysutil/fam.
In Makefile add CPPFLAGS.SunOS= -DSunOS and change the
#ifdef __SUNPRO_CC to #ifdef SunOS in src/RPC_TCP_Connector.c++,
because the Sun <rpc/pmap_prot.h> is buggy for any c++ compiler:
--- /usr/pkgsrc/sysutils/fam/Makefile.orig Wed Aug 10 22:57:56 2005
+++ /usr/pkgsrc/sysutils/fam/Makefile Tue Aug 30 12:10:55 2005
@@ -60,6 +60,7 @@
CPPFLAGS.Darwin+= -DNDEBUG
LDFLAGS.SunOS+= -lsocket -lnsl
+CPPFLAGS.SunOS+= -DSunOS
.if ${OPSYS} == "SunOS"
SUBST_CLASSES+= sunfix dirent
--------------------------------------------------------------------------
--- src/RPC_TCP_Connector.c++.orig Sat Jan 18 15:18:12 2003
+++ src/RPC_TCP_Connector.c++ Tue Aug 30 12:07:32 2005
@@ -21,11 +21,23 @@
// Temple Place - Suite 330, Boston MA 02111-1307, USA.
#include "RPC_TCP_Connector.h"
+#include "config.h"
+#define PORTMAP
+
#include <errno.h>
+#ifdef SunOS
+extern "C" {
+#endif
#include <rpc/rpc.h>
#include <rpc/pmap_prot.h>
+#ifdef SunOS
+}
+#endif
#include <sys/ioctl.h>
+#ifdef HAVE_SYS_FILIO_H
+#include <sys/filio.h>
+#endif
#include <sys/socket.h>
#include <unistd.h>
#include <string.h>