Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit
fcfb0c9442550ed5acf34a3b56d602408f25159b)
Conflicts:
cmake/modules/CephChecks.cmake
src/test/fio/CMakeLists.txt: check gettid() in /CMakeLists.txt
instead, as nautilus does not have cmake/modules/CephChecks.cmake by
then.
CHECK_FUNCTION_EXISTS(eventfd HAVE_EVENTFD)
CHECK_FUNCTION_EXISTS(getprogname HAVE_GETPROGNAME)
+CHECK_FUNCTION_EXISTS(gettid HAVE_GETTID)
CHECK_INCLUDE_FILES("linux/types.h" HAVE_LINUX_TYPES_H)
CHECK_INCLUDE_FILES("linux/version.h" HAVE_LINUX_VERSION_H)
add_library(fio_ceph_objectstore SHARED fio_ceph_objectstore.cc)
target_include_directories(fio_ceph_objectstore SYSTEM PUBLIC ${FIO_INCLUDE_DIR})
-# prevent fio from adding a 'typedef int bool'
-set(FIO_CFLAGS "-DCONFIG_HAVE_BOOL")
+# prevent fio from adding 'typedef int bool' and gettid()
+if(HAVE_GETTID)
+ set(FIO_CFLAGS "-DCONFIG_HAVE_BOOL -DCONFIG_HAVE_GETTID")
+else()
+ set(FIO_CFLAGS "-DCONFIG_HAVE_BOOL")
+endif()
# fio headers use typeof(), which requires c++11 extensions
set_target_properties(fio_ceph_objectstore PROPERTIES