Port: Add OSX mman.h compat
authorMichael Jeanson <mjeanson@efficios.com>
Thu, 5 Nov 2015 17:51:54 +0000 (12:51 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 6 May 2016 18:06:24 +0000 (14:06 -0400)
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
formats/lttng-live/lttng-live-comm.c
include/Makefile.am
include/babeltrace/compat/mman.h [new file with mode: 0644]

index 6541facfea57abd01ec711b2426d2ed0bfd3045a..7b4711be06095bafdaf7d9ca3126fda5b4d34483 100644 (file)
@@ -31,7 +31,6 @@
 #include <errno.h>
 #include <inttypes.h>
 #include <fcntl.h>
-#include <sys/mman.h>
 #include <poll.h>
 
 #include <babeltrace/ctf/ctf-index.h>
@@ -53,6 +52,7 @@
 #include <babeltrace/compat/memstream.h>
 #include <babeltrace/compat/send.h>
 #include <babeltrace/compat/string.h>
+#include <babeltrace/compat/mman.h>
 
 #include "lttng-live.h"
 #include "lttng-viewer-abi.h"
index eb58604a91cd7728443fb2e61889166ce91af3ec..39842e98d988a6e3c9ff3aeb082e50b4d0ac4611 100644 (file)
@@ -64,5 +64,6 @@ noinst_HEADERS = \
        babeltrace/compat/stdlib.h \
        babeltrace/compat/dirent.h \
        babeltrace/compat/stdio.h \
+       babeltrace/compat/mman.h \
        babeltrace/endian.h \
        babeltrace/mmap-align.h
diff --git a/include/babeltrace/compat/mman.h b/include/babeltrace/compat/mman.h
new file mode 100644 (file)
index 0000000..061e244
--- /dev/null
@@ -0,0 +1,36 @@
+#ifndef _BABELTRACE_COMPAT_MMAN_H
+#define _BABELTRACE_COMPAT_MMAN_H
+
+/*
+ * babeltrace/compat/mman.h
+ *
+ * Copyright (C) 2015  Michael Jeanson <mjeanson@efficios.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include <sys/mman.h>
+
+#ifndef MAP_ANONYMOUS
+# ifdef MAP_ANON
+#   define MAP_ANONYMOUS MAP_ANON
+# endif
+#endif
+
+#endif /* _BABELTRACE_COMPAT_MMAN_H */
This page took 0.025704 seconds and 4 git commands to generate.