From: Michael Jeanson Date: Thu, 5 Nov 2015 17:51:54 +0000 (-0500) Subject: Port: Add OSX mman.h compat X-Git-Tag: v1.4.0-rc1~9 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=d8053c02b5d66c07ef04af7e34d8a08b6a9e3f9c Port: Add OSX mman.h compat Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- diff --git a/formats/lttng-live/lttng-live-comm.c b/formats/lttng-live/lttng-live-comm.c index 6541facf..7b4711be 100644 --- a/formats/lttng-live/lttng-live-comm.c +++ b/formats/lttng-live/lttng-live-comm.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include @@ -53,6 +52,7 @@ #include #include #include +#include #include "lttng-live.h" #include "lttng-viewer-abi.h" diff --git a/include/Makefile.am b/include/Makefile.am index eb58604a..39842e98 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -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 index 00000000..061e244b --- /dev/null +++ b/include/babeltrace/compat/mman.h @@ -0,0 +1,36 @@ +#ifndef _BABELTRACE_COMPAT_MMAN_H +#define _BABELTRACE_COMPAT_MMAN_H + +/* + * babeltrace/compat/mman.h + * + * Copyright (C) 2015 Michael Jeanson + * + * 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 + +#ifndef MAP_ANONYMOUS +# ifdef MAP_ANON +# define MAP_ANONYMOUS MAP_ANON +# endif +#endif + +#endif /* _BABELTRACE_COMPAT_MMAN_H */