diff --git a/CMakeLists.txt b/CMakeLists.txt index dd3f2d95..86535cf6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -167,7 +167,7 @@ if(WIN32) set(HAVE_STRUCT_CMSGHDR 1) else() check_symbol_exists( - cmsghdr + CMSG_FIRSTHDR sys/socket.h HAVE_STRUCT_CMSGHDR) endif() diff --git a/cmake_coap_config.h.in b/cmake_coap_config.h.in index 12444227..d01ab53d 100644 --- a/cmake_coap_config.h.in +++ b/cmake_coap_config.h.in @@ -13,6 +13,10 @@ #ifndef COAP_CONFIG_H_ #define COAP_CONFIG_H_ +#if ! defined(_WIN32) +#define _GNU_SOURCE +#endif + /* Define to 1 if you have header file. */ #cmakedefine HAVE_WS2TCPIP_H @HAVE_WS2TCPIP_H@