[lttng-dev] [PATCH babeltrace] Fix: Static build on OS X

Michael Jeanson mjeanson at efficios.com
Wed May 4 14:54:55 UTC 2016


The OS X linker fails to resolve common symbols in a static
library for some unexplained reason. Initializing the variables
to zero makes the symbol become uninitialized data and fixes
the linking.

Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
---
 lib/babeltrace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/babeltrace.c b/lib/babeltrace.c
index 0bcfd1d..f05808d 100644
--- a/lib/babeltrace.c
+++ b/lib/babeltrace.c
@@ -31,7 +31,7 @@
 #include <babeltrace/ctf-text/types.h>
 #include <stdlib.h>
 
-int babeltrace_verbose, babeltrace_debug;
+int babeltrace_verbose = 0, babeltrace_debug = 0;
 
 static
 void __attribute__((constructor)) init_babeltrace_lib(void)
-- 
2.7.4



More information about the lttng-dev mailing list