aboutsummaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
Diffstat (limited to 'CMake')
-rw-r--r--CMake/CheckTypeSize.c.in3
-rw-r--r--CMake/CheckTypeSize.cmake3
2 files changed, 5 insertions, 1 deletions
diff --git a/CMake/CheckTypeSize.c.in b/CMake/CheckTypeSize.c.in
index 9e48df153..8ff07bfd1 100644
--- a/CMake/CheckTypeSize.c.in
+++ b/CMake/CheckTypeSize.c.in
@@ -6,6 +6,9 @@
# include <sys/types.h>
#endif /* HAVE_SYS_TYPES_H */
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
#ifdef _WIN32
# include <winsock2.h>
diff --git a/CMake/CheckTypeSize.cmake b/CMake/CheckTypeSize.cmake
index e768254d6..2c2ceab97 100644
--- a/CMake/CheckTypeSize.cmake
+++ b/CMake/CheckTypeSize.cmake
@@ -13,7 +13,8 @@ macro(CHECK_TYPE_SIZE TYPE VARIABLE)
set(CHECK_TYPE_SIZE_TYPE "${TYPE}")
set(MACRO_CHECK_TYPE_SIZE_FLAGS
"${CMAKE_REQUIRED_FLAGS}")
- foreach(def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H)
+ foreach(def HAVE_SYS_TYPES_H
+ HAVE_STDINT_H HAVE_STDDEF_H HAVE_SYS_SOCKET_H)
if("${def}")
set(MACRO_CHECK_TYPE_SIZE_FLAGS
"${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")