From b24a78cccfc2751449e5bc358aab5a3955689a1f Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sun, 29 Jan 2017 23:05:18 +0300 Subject: [PATCH] cmake: check for 'struct linger' existence --- CMakeLists.txt | 2 ++ event-config.h.cmake | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ae1b4e47..25327a35 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -578,6 +578,8 @@ if(EVENT__HAVE_STRUCT_SOCKADDR_STORAGE) __ss_family "${SOCKADDR_HEADERS}" EVENT__HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY) endif() +CHECK_TYPE_SIZE("struct linger" EVENT__HAVE_STRUCT_LINGER) + # Group the source files. set(HDR_PRIVATE bufferevent-internal.h diff --git a/event-config.h.cmake b/event-config.h.cmake index c1355be9..faa159b7 100644 --- a/event-config.h.cmake +++ b/event-config.h.cmake @@ -313,6 +313,9 @@ /* Define to 1 if `__ss_family' is a member of `struct sockaddr_storage'. */ #cmakedefine EVENT__HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY +/* Define to 1 if the system has the type `struct linger'. */ +#cmakedefine EVENT__HAVE_STRUCT_LINGER + /* Define to 1 if you have the `sysctl' function. */ #cmakedefine EVENT__HAVE_SYSCTL -- 2.40.0