summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2009-04-24 15:28:40 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-04-24 15:36:57 +0530
commite0c284c6e7c98b3a2fbd5c60d59b928d6e7af88a (patch)
tree16f3e561ca2df198a9bff93ed85e7137410d92a5 /libglusterfs
parent7b2e459db65edd302aa12476bc73b3b7a17b1410 (diff)
iobuf: Define MAP_ANONYMOUS
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/iobuf.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libglusterfs/src/iobuf.h b/libglusterfs/src/iobuf.h
index 71b115c5d..d17c1db48 100644
--- a/libglusterfs/src/iobuf.h
+++ b/libglusterfs/src/iobuf.h
@@ -25,6 +25,17 @@
#include <pthread.h>
#include <sys/mman.h>
+/* Lets try to define the new anonymous mapping
+ * flag, in case the system is still using the
+ * now deprecated MAP_ANON flag.
+ *
+ * Also, this should ideally be in a centralized/common
+ * header which can be used by other source files also.
+ */
+#ifndef MAP_ANONYMOUS
+#define MAP_ANONYMOUS MAP_ANON
+#endif
+
/* one allocatable unit for the consumers of the IOBUF API */
/* each unit hosts @page_size bytes of memory */
struct iobuf;