diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d9e470fe..0b7e55ec0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -156,7 +156,6 @@ check_include_files("stdint.h" HAVE_STDINT_H) check_include_files("stdlib.h" HAVE_STDLIB_H) check_include_files("string.h" HAVE_STRING_H) check_include_files("strings.h" HAVE_STRINGS_H) -check_include_files("sys/cdefs.h" HAVE_SYS_CDEFS_H) check_include_files("sys/guarded.h" HAVE_SYS_GUARDED_H) check_include_files("sys/stat.h" HAVE_SYS_STAT_H) check_include_files("sys/types.h" HAVE_SYS_TYPES_H) diff --git a/cmake/config.h.in b/cmake/config.h.in index 6696e9863..97c94cc8e 100644 --- a/cmake/config.h.in +++ b/cmake/config.h.in @@ -176,9 +176,6 @@ /* Define to 1 if you have the `sysconf' function. */ #cmakedefine01 HAVE_SYSCONF -/* Define to 1 if you have the header file. */ -#cmakedefine01 HAVE_SYS_CDEFS_H - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_GUARDED_H diff --git a/os/linux_base.h b/os/linux_base.h index c8b9cad7c..58b497148 100644 --- a/os/linux_base.h +++ b/os/linux_base.h @@ -13,9 +13,12 @@ #ifndef __OS_LINUX_BASE__ #define __OS_LINUX_BASE__ +#if __has_include() +#include +#endif #include -#if HAVE_SYS_CDEFS_H +#if __has_include() #include #endif diff --git a/private/private.h b/private/private.h index ed9f876cc..228ce2c19 100644 --- a/private/private.h +++ b/private/private.h @@ -28,7 +28,12 @@ #define __DISPATCH_PRIVATE__ #ifdef __APPLE__ +#include +#include #include +#include +#elif defined(__linux__) +#include #endif #if TARGET_OS_MAC @@ -39,9 +44,6 @@ #if HAVE_UNISTD_H #include #endif -#if HAVE_SYS_CDEFS_H -#include -#endif #include #if TARGET_OS_MAC #include