[lttng-dev] [PATCH babeltrace stable-1.5 2/5] Port: win32 DLLs don't support hidden symbols

Michael Jeanson mjeanson at efficios.com
Thu Feb 2 22:03:09 UTC 2017


Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
---
 include/babeltrace/babeltrace-internal.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/babeltrace/babeltrace-internal.h b/include/babeltrace/babeltrace-internal.h
index 0e73cdb..6f8e200 100644
--- a/include/babeltrace/babeltrace-internal.h
+++ b/include/babeltrace/babeltrace-internal.h
@@ -161,8 +161,14 @@ extern int babeltrace_verbose, babeltrace_debug;
 
 /*
  * BT_HIDDEN: set the hidden attribute for internal functions
+ * On Windows, symbols are local unless explicitly exported,
+ * see https://gcc.gnu.org/wiki/Visibility
  */
+#if defined(_WIN32) || defined(__CYGWIN__)
+#define BT_HIDDEN
+#else
 #define BT_HIDDEN __attribute__((visibility("hidden")))
+#endif
 
 #define BT_CTF_MAJOR	1
 #define BT_CTF_MINOR	8
-- 
2.7.4



More information about the lttng-dev mailing list