As not all dlfnc.h includes define it consistently.
endif ()
endif ()
+if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ # For RTLD_DEFAULT and RTLD_NEXT
+ add_definitions (-D_GNU_SOURCE)
+endif ()
+
# Put all executables into the same top level build directory, regardless of
# which subdirectory they are declared
#if !defined(_WIN32)
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE // for dladdr
-#endif
#include <dlfcn.h>
#endif
print '#include <stdlib.h>'
print '#include <string.h>'
print
- print '#ifndef _GNU_SOURCE'
- print '#define _GNU_SOURCE // for dladdr'
- print '#endif'
print '#include <dlfcn.h>'
print
print '#include "trace_writer_local.hpp"'