Skip to content

Commit

Permalink
Fix build for FreeBSD.
Browse files Browse the repository at this point in the history
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>.
  • Loading branch information
itbot08 authored and delcypher committed Jul 31, 2017
1 parent fa4d669 commit 977e032
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions lib/Support/CompressionStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#endif
#include <unistd.h>

namespace klee {

Expand Down

0 comments on commit 977e032

Please sign in to comment.