From: Michael Jeanson Date: Thu, 13 Jul 2017 15:26:53 +0000 (-0400) Subject: Port: Add dummy symbol for macOS linker X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=6a9af156b4c2389123b18d19c1aa76acc1f16bcf Port: Add dummy symbol for macOS linker Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- diff --git a/compat/compat_mman.c b/compat/compat_mman.c index 1c95d8ef..bbca82ca 100644 --- a/compat/compat_mman.c +++ b/compat/compat_mman.c @@ -29,6 +29,15 @@ #define BT_LOG_TAG "COMPAT-MMAN" #include "logging.h" +#ifdef __APPLE__ +/* + * On macOS, we need a dummy symbol so that the linker won't + * complain of an empty table of contents. + */ +BT_HIDDEN +int bt_mman_dummy_symbol; +#endif /* __APPLE__ */ + #ifdef __MINGW32__ #include diff --git a/compat/compat_uuid.c b/compat/compat_uuid.c index e495af1c..a79a01e7 100644 --- a/compat/compat_uuid.c +++ b/compat/compat_uuid.c @@ -25,6 +25,15 @@ #define BT_LOG_TAG "COMPAT-UUID" #include "logging.h" +#ifdef __APPLE__ +/* + * On macOS, we need a dummy symbol so that the linker won't + * complain of an empty table of contents. + */ +BT_HIDDEN +int bt_uuid_dummy_symbol; +#endif /* __APPLE__ */ + #ifdef __MINGW32__ #include