mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-10 06:51:54 +00:00
Define socklen_t in according to a feature test (#949)
Co-authored-by: KO Myung-Hun <komh@chollian.net>
This commit is contained in:
parent
ec6d563c39
commit
8e56188316
3 changed files with 18 additions and 0 deletions
|
@ -774,6 +774,18 @@ if ( enable-ipv6 )
|
|||
endif ( HAVE_INETNTOP )
|
||||
endif ( enable-ipv6 )
|
||||
|
||||
unset ( HAVE_SOCKLEN_T CACHE )
|
||||
set ( CMAKE_EXTRA_INCLUDE_FILES_SAVE ${CMAKE_EXTRA_INCLUDE_FILES} )
|
||||
if ( WIN32 )
|
||||
set ( CMAKE_EXTRA_INCLUDE_FILES "winsock2.h;ws2tcpip.h" )
|
||||
else ( WIN32 )
|
||||
set ( CMAKE_EXTRA_INCLUDE_FILES sys/socket.h )
|
||||
endif ( WIN32 )
|
||||
check_type_size ( socklen_t SOCKLEN_T )
|
||||
set ( CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES_SAVE} )
|
||||
if ( HAVE_SOCKLEN_T )
|
||||
set ( HAVE_SOCKLEN_T 1 )
|
||||
endif ( HAVE_SOCKLEN_T )
|
||||
|
||||
# General configuration file
|
||||
configure_file ( ${CMAKE_SOURCE_DIR}/src/config.cmake
|
||||
|
|
|
@ -262,4 +262,7 @@
|
|||
/* Define to 1 if you have the logf() function. */
|
||||
#cmakedefine HAVE_LOGF @HAVE_LOGF@
|
||||
|
||||
/* Define to 1 if you have the socklen_t type. */
|
||||
#cmakedefine HAVE_SOCKLEN_T @HAVE_SOCKLEN_T@
|
||||
|
||||
#endif /* CONFIG_H */
|
||||
|
|
|
@ -205,8 +205,11 @@ char *fluid_strtok(char **str, char *delim);
|
|||
#define INCL_DOS
|
||||
#include <os2.h>
|
||||
|
||||
/* Define socklen_t if not provided */
|
||||
#if !HAVE_SOCKLEN_T
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
Time functions
|
||||
|
|
Loading…
Reference in a new issue