Fix: test_seek static linking
[babeltrace.git] / tests / lib / test_seek.c
index b33f80dc2e08455987ecc01b244916371712e417..170c830dd6ec30aeced250e2295e9a7b8d279b6a 100644 (file)
@@ -23,6 +23,7 @@
 #include <babeltrace/iterator.h>
 #include <babeltrace/ctf/iterator.h>
 #include <babeltrace/ctf/events.h>
+#include <babeltrace/babeltrace-internal.h>    /* For symbol side-effects */
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -273,6 +274,13 @@ int main(int argc, char **argv)
        uint64_t expected_begin;
        uint64_t expected_last;
 
+       /*
+        * Side-effects ensuring libs are not optimized away by static
+        * linking.
+        */
+       babeltrace_debug = 0;   /* libbabeltrace.la */
+       opt_clock_offset = 0;   /* libbabeltrace-ctf.la */
+
        plan_tests(NR_TESTS);
 
        if (argc < 4) {
This page took 0.023619 seconds and 4 git commands to generate.