instead assuming it's a macro use CHECK_TYPE_SIZE to check it.
on Darwin, it's defined as `__darwin_suseconds_t`
Signed-off-by: Kefu Chai <kchai@redhat.com>
add_subdirectory(crimson)
endif()
+include(CheckTypeSize)
+set(CMAKE_EXTRA_INCLUDE_FILES "sys/time.h")
+CHECK_TYPE_SIZE(suseconds_t SUSECONDS_T)
+unset(CMAKE_EXTRA_INCLUDE_FILES)
+
set(libcommon_files
${CMAKE_BINARY_DIR}/src/include/ceph_ver.h
ceph_ver.c
/* Define if the system has the type `in_addr_t' */
#cmakedefine HAVE_IN_ADDR_T
+/* Define if you have suseconds_t */
+#cmakedefine HAVE_SUSECONDS_T
+
/* Define if you have res_nquery */
#cmakedefine HAVE_RES_NQUERY
#include "include/ceph_assert.h"
#include "common/ceph_time.h"
-#ifndef suseconds_t
+#ifndef HAVE_SUSECONDS_T
typedef long suseconds_t;
#endif