From: Klaus Crusius Date: Sat, 28 Nov 2020 17:17:11 +0000 (+0100) Subject: cmake: check for linux/tcp.h X-Git-Tag: curl-7_74_0~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d6bfbfadd30984737f4481087678219be88fc5f7;p=thirdparty%2Fcurl.git cmake: check for linux/tcp.h The HAVE_LINUX_TCP_H define was not set by cmake. Closes #6252 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 7a2ad440bd..6a1a6fe8ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -909,6 +909,7 @@ check_include_file_concat("net/if.h" HAVE_NET_IF_H) check_include_file_concat("netdb.h" HAVE_NETDB_H) check_include_file_concat("netinet/in.h" HAVE_NETINET_IN_H) check_include_file_concat("netinet/tcp.h" HAVE_NETINET_TCP_H) +check_include_file("linux/tcp.h" HAVE_LINUX_TCP_H) check_include_file_concat("pem.h" HAVE_PEM_H) check_include_file_concat("poll.h" HAVE_POLL_H) diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake index 9bf07433c4..082d76b371 100644 --- a/lib/curl_config.h.cmake +++ b/lib/curl_config.h.cmake @@ -473,6 +473,9 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_NETINET_TCP_H 1 +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_LINUX_TCP_H 1 + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_NET_IF_H 1 diff --git a/lib/sendf.c b/lib/sendf.c index b6e5e7463d..04cc725f5a 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -28,6 +28,8 @@ #ifdef HAVE_LINUX_TCP_H #include +#elif defined(HAVE_NETINET_TCP_H) +#include #endif #include diff --git a/lib/setopt.c b/lib/setopt.c index 12a268e94b..58956c1e95 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -30,6 +30,8 @@ #ifdef HAVE_LINUX_TCP_H #include +#elif defined(HAVE_NETINET_TCP_H) +#include #endif #include "urldata.h"