summarylogtreecommitdiffstats
path: root/lttng-uts-40.patch
blob: 6534d0d5339e112ca0b587484624fc9a7bcca2c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
diff -Naur src/pal/src/configure.cmake-orig src/pal/src/configure.cmake
--- src/pal/src/configure.cmake-orig    2016-12-27 09:27:00.480715728 -0500
+++ src/pal/src/configure.cmake 2016-12-27 09:26:28.707299084 -0500
@@ -13,7 +13,7 @@
   set(CMAKE_REQUIRED_INCLUDES /opt/local/include)
 endif()
 if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin AND NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD AND NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
-  set(CMAKE_REQUIRED_DEFINITIONS "-D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L")
+  set(CMAKE_REQUIRED_DEFINITIONS "-D_BSD_SOURCE -D_SVID_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L")
 endif()
 
 list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_FILE_OFFSET_BITS=64)
@@ -33,7 +33,15 @@
 check_include_files(lwp.h HAVE_LWP_H)
 check_include_files(libunwind.h HAVE_LIBUNWIND_H)
 check_include_files(runetype.h HAVE_RUNETYPE_H)
+
+if(NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD AND NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
+  set(CMAKE_REQUIRED_FLAGS "-ldl")
+endif()
 check_include_files(lttng/tracepoint.h HAVE_LTTNG_TRACEPOINT_H)
+if(NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD AND NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
+  unset(CMAKE_REQUIRED_FLAGS)
+endif()
+
 check_include_files(uuid/uuid.h HAVE_LIBUUID_H)
 check_include_files(sys/sysctl.h HAVE_SYS_SYSCTL_H)
 check_include_files(gnu/lib-names.h HAVE_GNU_LIBNAMES_H)
@@ -62,7 +70,6 @@
 check_function_exists(localtime_r HAVE_LOCALTIME_R)
 check_function_exists(gmtime_r HAVE_GMTIME_R)
 check_function_exists(timegm HAVE_TIMEGM)
-check_function_exists(_snwprintf HAVE__SNWPRINTF)
 check_function_exists(poll HAVE_POLL)
 check_function_exists(statvfs HAVE_STATVFS)
 check_function_exists(thread_self HAVE_THREAD_SELF)