Fix cmake ipv6 detection
This commit is contained in:
parent
736d8c6192
commit
4ef644de88
|
@ -1,3 +1,4 @@
|
|||
INCLUDE(CheckCSourceCompiles)
|
||||
INCLUDE(CheckIncludeFiles)
|
||||
INCLUDE(CheckFunctionExists)
|
||||
INCLUDE(CheckVariableExists)
|
||||
|
@ -104,7 +105,15 @@ CHECK_FUNCTION_EXISTS(strptime HAVE_STRPTIME)
|
|||
CHECK_FUNCTION_EXISTS(syslog HAVE_SYSLOG)
|
||||
CHECK_FUNCTION_EXISTS(writev HAVE_WRITEV)
|
||||
CHECK_FUNCTION_EXISTS(inet_aton HAVE_INET_ATON)
|
||||
CHECK_FUNCTION_EXISTS(inet_atop HAVE_IPV6)
|
||||
CHECK_C_SOURCE_COMPILES("
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
int main() {
|
||||
struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0;
|
||||
return 0;
|
||||
}" HAVE_IPV6)
|
||||
|
||||
## refactor me
|
||||
MACRO(XCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags)
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#cmakedefine HAVE_UNISTD_H
|
||||
#cmakedefine HAVE_PTHREAD_H
|
||||
#cmakedefine HAVE_INET_ATON
|
||||
#cmakedefine HAVE_IPV6
|
||||
|
||||
/* XATTR */
|
||||
#cmakedefine HAVE_ATTR_ATTRIBUTES_H
|
||||
|
|
Loading…
Reference in New Issue