mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
Fix type checks in CMake
Use CHECK_TYPE_SIZE to check existence of types.
This commit is contained in:
parent
ce8079c09b
commit
8a59033565
1 changed files with 8 additions and 1 deletions
|
@ -154,6 +154,7 @@ include(CheckFunctionExists)
|
|||
include(CheckIncludeFile)
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckLibraryExists)
|
||||
include(CheckTypeSize)
|
||||
|
||||
CHECK_FUNCTION_EXISTS(bzero HAVE_BZERO)
|
||||
CHECK_FUNCTION_EXISTS(fork HAVE_FORK)
|
||||
|
@ -196,8 +197,14 @@ set(HAVE_WORKING_VFORK HAVE_VFORK)
|
|||
|
||||
CHECK_INCLUDE_FILES("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
|
||||
|
||||
if (NOT HAVE_SYS_TYPES_H)
|
||||
CHECK_TYPE_SIZE(pid_t PID_T_SIZE)
|
||||
CHECK_TYPE_SIZE(size_t SIZE_T_SIZE)
|
||||
|
||||
if (NOT PID_T_SIZE)
|
||||
set(pid_t int)
|
||||
endif()
|
||||
|
||||
if (NOT SIZE_T_SIZE)
|
||||
set(size_t "unsigned int")
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue