From 6a9af156b4c2389123b18d19c1aa76acc1f16bcf Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Thu, 13 Jul 2017 11:26:53 -0400 Subject: [PATCH] Port: Add dummy symbol for macOS linker MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- compat/compat_mman.c | 9 +++++++++ compat/compat_uuid.c | 9 +++++++++ 2 files changed, 18 insertions(+) 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 -- 2.34.1