summaryrefslogtreecommitdiffstats
path: root/include/c.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/c.h')
-rw-r--r--include/c.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/c.h b/include/c.h
index ca028baee..aec34394d 100644
--- a/include/c.h
+++ b/include/c.h
@@ -355,4 +355,12 @@ static inline int xusleep(useconds_t usec)
*/
#define UL_GETPW_BUFSIZ (16 * 1024)
+/*
+ * Darwin or other BSDs may only have MAP_ANON. To get it on Darwin we must
+ * define _DARWIN_C_SOURCE before including sys/mman.h. We do this in config.h.
+ */
+#if !defined MAP_ANONYMOUS && defined MAP_ANON
+# define MAP_ANONYMOUS (MAP_ANON)
+#endif
+
#endif /* UTIL_LINUX_C_H */