summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/protocol.h
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2009-08-27 01:53:32 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-09-02 10:30:00 -0700
commitc50ead8d5318d759207543ea040baaf8ddadc628 (patch)
treeb93e3f9a9495d6d66e88859c934bc0e0d63c41f9 /libglusterfs/src/protocol.h
parentbc1bacb14650809f4685025c9fb4b799f9510df9 (diff)
core: Fix build failure on non-Linux systems
Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 230 (Bulid fails on Solaris and Mac OS due to Linux specific flags) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=230
Diffstat (limited to 'libglusterfs/src/protocol.h')
-rw-r--r--libglusterfs/src/protocol.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/libglusterfs/src/protocol.h b/libglusterfs/src/protocol.h
index 1290dce46..f03759f37 100644
--- a/libglusterfs/src/protocol.h
+++ b/libglusterfs/src/protocol.h
@@ -280,9 +280,12 @@ gf_flags_from_flags (uint32_t flags)
XLATE_BIT (flags, gf_flags, O_DIRECT);
XLATE_BIT (flags, gf_flags, O_DIRECTORY);
XLATE_BIT (flags, gf_flags, O_NOFOLLOW);
+#ifdef O_NOATIME
XLATE_BIT (flags, gf_flags, O_NOATIME);
+#endif
+#ifdef O_CLOEXEC
XLATE_BIT (flags, gf_flags, O_CLOEXEC);
-
+#endif
XLATE_BIT (flags, gf_flags, O_LARGEFILE);
return gf_flags;
@@ -307,9 +310,12 @@ gf_flags_to_flags (uint32_t gf_flags)
UNXLATE_BIT (gf_flags, flags, O_DIRECT);
UNXLATE_BIT (gf_flags, flags, O_DIRECTORY);
UNXLATE_BIT (gf_flags, flags, O_NOFOLLOW);
+#ifdef O_NOATIME
UNXLATE_BIT (gf_flags, flags, O_NOATIME);
+#endif
+#ifdef O_CLOEXEC
UNXLATE_BIT (gf_flags, flags, O_CLOEXEC);
-
+#endif
UNXLATE_BIT (gf_flags, flags, O_LARGEFILE);
return flags;