pkgsrc/sysutils/fam/patches/patch-av
sketch 97ff422b68 Various fixes/cleanups to get this package compiling on Solaris:
+ Use the mnttab(4) interface instead of mntent.
 + C++ syntax cleanups to appease the SunPro compiler.
 + Use MAXPATHLEN instead of NAME_MAX which can be unimplemented on strict
   POSIX systems.
 + Use POSIX inttypes.h if BSD types are not available.
 + RPC includes and C++ namespace fixes.
 + Use dirent(3) instead of older sys/dir.h interface.
 + Avoid `sun' namespace collision.

Patch based on the work of Robert Lillack and others, described in
http://mail-index.netbsd.org/tech-pkg/2004/08/20/0005.html and tested with
SunPro and gcc.
2004-11-19 12:35:22 +00:00

39 lines
968 B
Text

$NetBSD: patch-av,v 1.5 2004/11/19 12:35:22 sketch Exp $
--- src/FileSystem.h.orig 2004-11-08 16:45:59.904416000 +0000
+++ src/FileSystem.h 2004-11-08 16:48:24.970550000 +0000
@@ -27,7 +27,13 @@
#include "Request.h"
#include "Set.h"
+#include "fam-mntent.h"
+
+#if defined(HAVE_SYS_MNTTAB_H)
+struct mnttab;
+#else
struct mntent;
+#endif
struct stat;
// FileSystem is the abstract base class for a per-filesystem object.
@@ -91,12 +97,20 @@
typedef Set<ClientInterest *> Interests;
+#if defined(HAVE_SYS_MNTTAB_H)
+ FileSystem(const mnttab&);
+#else
FileSystem(const mntent&);
+#endif
virtual ~FileSystem();
// Miscellaneous routines
+#if defined(HAVE_SYS_MNTTAB_H)
+ bool matches(const mnttab& m) const;
+#else
bool matches(const mntent& m) const;
+#endif
const char *dir() const { return mydir; }
const char *fsname() const { return myfsname; }
const Interests& interests() { return myinterests; }