summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/iobuf.h
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/iobuf.h')
-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 71b115c5d40..d17c1db486d 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;