]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: check for linux/tcp.h
authorKlaus Crusius <klaus.crusius@web.de>
Sat, 28 Nov 2020 17:17:11 +0000 (18:17 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 1 Dec 2020 11:32:55 +0000 (12:32 +0100)
The HAVE_LINUX_TCP_H define was not set by cmake.

Closes #6252

CMakeLists.txt
lib/curl_config.h.cmake
lib/sendf.c
lib/setopt.c

index 7a2ad440bdaae9fc95dfa942dcb434eb3db06080..6a1a6fe8efd1553500ded050ff2e1b4727e1b7d2 100644 (file)
@@ -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)
index 9bf07433c4761d588b8f9ec865b05f2167f84cf1..082d76b371b4eecd8790431266fb4db9b6c219bf 100644 (file)
 /* Define to 1 if you have the <netinet/tcp.h> header file. */
 #cmakedefine HAVE_NETINET_TCP_H 1
 
+/* Define to 1 if you have the <linux/tcp.h> header file. */
+#cmakedefine HAVE_LINUX_TCP_H 1
+
 /* Define to 1 if you have the <net/if.h> header file. */
 #cmakedefine HAVE_NET_IF_H 1
 
index b6e5e7463d480943ec6ce7fda1bf77609e330992..04cc725f5a438048d64cd61458399f2af9eddaa4 100644 (file)
@@ -28,6 +28,8 @@
 
 #ifdef HAVE_LINUX_TCP_H
 #include <linux/tcp.h>
+#elif defined(HAVE_NETINET_TCP_H)
+#include <netinet/tcp.h>
 #endif
 
 #include <curl/curl.h>
index 12a268e94b8f9d0d4dbb5fde0133148549b9da8c..58956c1e958f350932e279440f4f34805a040b85 100644 (file)
@@ -30,6 +30,8 @@
 
 #ifdef HAVE_LINUX_TCP_H
 #include <linux/tcp.h>
+#elif defined(HAVE_NETINET_TCP_H)
+#include <netinet/tcp.h>
 #endif
 
 #include "urldata.h"