about summary refs log tree commit diff homepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorTatiana Tikhomirova <itbot@bk.ru>2017-05-01 19:31:21 +0300
committerDan Liew <delcypher@gmail.com>2017-07-31 21:18:55 +0100
commit977e032add0e29683bc4edc8c03aef9a81fb6d6a (patch)
treee4dfe74d3bc05ad399f8e1f265ed0d91ad68ed82 /CMakeLists.txt
parentfa4d6690d0413b354afe155f9e3f67f7069a6891 (diff)
downloadklee-977e032add0e29683bc4edc8c03aef9a81fb6d6a.tar.gz
Fix build for FreeBSD.
On FreeBSD <sys/capabilities.h> is present in libc, so we don't require libcap there.
Close and write functions are located in <unistd.h>.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2f162f21..80e6b506 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -418,7 +418,8 @@ if (HAVE_SYS_CAPABILITY_H)
     NAMES cap
     DOC "libcap library"
   )
-  if (NOT LIBCAP_LIBRARIES)
+# On FreeBSD <sys/capabilities.h> is present in libc, so we don't require libcap there.
+  if (NOT LIBCAP_LIBRARIES AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
     message(FATAL_ERROR "Found \"sys/capability.h\" but could not find libcap")
   endif()
 else()