about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt6
-rw-r--r--include/klee/Config/config.h.cmin3
-rw-r--r--runtime/POSIX/CMakeLists.txt5
3 files changed, 8 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f8ce0d16..552d431a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -394,12 +394,16 @@ else()
   set(HAVE_SELINUX 0)
 endif()
 
+try_compile (FSTATAT_PATH_ACCEPTS_NULL
+  ${CMAKE_BINARY_DIR}
+  ${PROJECT_SOURCE_DIR}/cmake/fstatat.c
+)
+
 ################################################################################
 # KLEE runtime support
 ################################################################################
 # This is set here and not in `runtime` because `config.h` needs to be generated.
 
-
 set(available_klee_runtime_build_types
   "Release"
   "Release+Debug"
diff --git a/include/klee/Config/config.h.cmin b/include/klee/Config/config.h.cmin
index 50ccf3fd..f0c3f629 100644
--- a/include/klee/Config/config.h.cmin
+++ b/include/klee/Config/config.h.cmin
@@ -13,6 +13,9 @@
 /* Using Z3 Solver backend */
 #cmakedefine ENABLE_Z3 @ENABLE_Z3@
 
+/* Define if fstatat() accepts NULL as pathname argument. */
+#cmakedefine FSTATAT_PATH_ACCEPTS_NULL 1
+
 /* Does the platform use __ctype_b_loc, etc. */
 #cmakedefine HAVE_CTYPE_EXTERNALS @HAVE_CTYPE_EXTERNALS@
 
diff --git a/runtime/POSIX/CMakeLists.txt b/runtime/POSIX/CMakeLists.txt
index d8208d9b..02d06736 100644
--- a/runtime/POSIX/CMakeLists.txt
+++ b/runtime/POSIX/CMakeLists.txt
@@ -20,11 +20,6 @@ set(SRC_FILES
         stubs.c
         )
 
-try_compile (FSTATAT_PATH_ACCEPTS_NULL
-        ${CMAKE_BINARY_DIR}
-        ${PROJECT_SOURCE_DIR}/cmake/fstatat.c
-        )
-
 # Build it
 include("${CMAKE_SOURCE_DIR}/cmake/compile_bitcode_library.cmake")
 prefix_with_path("${SRC_FILES}" "${CMAKE_CURRENT_SOURCE_DIR}/" prefixed_files)