From 1b74cf992986287a510fe3b28a8ee7554e8b0992 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sat, 21 Jun 2014 02:00:23 -0700 Subject: porting: Port for FreeBSD rebased from Mike Ma's efforts - Provides a working Gluster Management Daemon, CLI - Provides a working GlusterFS server, GlusterNFS server - Provides a working GlusterFS client - execinfo port from FreeBSD is moved into ./contrib/libexecinfo for ease of portability on NetBSD. (FreeBSD 10 and OSX provide execinfo natively) - More portability cleanups for Darwin, FreeBSD and NetBSD - Provides a new rc script for FreeBSD Change-Id: I8dff336f97479ca5a7f9b8c6b730051c0f8ac46f BUG: 1111774 Original-Author: Mike Ma Signed-off-by: Harshavardhana Reviewed-on: http://review.gluster.org/8141 Tested-by: Gluster Build System Reviewed-by: Kaleb KEITHLEY --- contrib/mount/mntent.c | 6 ++++-- contrib/mount/mntent_compat.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'contrib/mount') diff --git a/contrib/mount/mntent.c b/contrib/mount/mntent.c index 991e694f1cd..e9b448845a7 100644 --- a/contrib/mount/mntent.c +++ b/contrib/mount/mntent.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. */ -#if defined(GF_DARWIN_HOST_OS) || defined(__NetBSD__) +#if !defined(GF_LINUX_HOST_OS) #include #include #include @@ -103,7 +103,9 @@ flags2opts (int flags) if (flags & MNT_SYNCHRONOUS) res = concatopt(res, "sync"); if (flags & MNT_NOEXEC) res = concatopt(res, "noexec"); if (flags & MNT_NOSUID) res = concatopt(res, "nosuid"); +#if !defined(__FreeBSD__) if (flags & MNT_NODEV) res = concatopt(res, "nodev"); +#endif /* __FreeBSD__ */ if (flags & MNT_UNION) res = concatopt(res, "union"); if (flags & MNT_ASYNC) res = concatopt(res, "async"); #if !defined(GF_DARWIN_HOST_OS) @@ -211,4 +213,4 @@ endmntent (FILE *fp) return 1; /* endmntent() always returns 1 */ } -#endif /* GF_DARWIN_HOST_OS || __NetBSD__ */ +#endif /* !GF_LINUX_HOST_OS */ diff --git a/contrib/mount/mntent_compat.h b/contrib/mount/mntent_compat.h index 3f9cc931266..ca82e9aa60f 100644 --- a/contrib/mount/mntent_compat.h +++ b/contrib/mount/mntent_compat.h @@ -11,7 +11,7 @@ #ifndef _MNTENT_H #define _MNTENT_H -#if defined(GF_DARWIN_HOST_OS) || defined(__NetBSD__) +#if !defined(GF_LINUX_HOST_OS) #include struct mntent { -- cgit