summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Crusius <klaus.crusius@web.de>2020-11-28 18:17:11 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-12-01 12:32:55 +0100
commitd6bfbfadd30984737f4481087678219be88fc5f7 (patch)
tree93a4fcdffcdf72278768028274091f8d7e9f9a40
parent221c9da9af187a69ff5775ca95bc5ce5f10ba41d (diff)
downloadcurl-d6bfbfadd30984737f4481087678219be88fc5f7.tar.gz
cmake: check for linux/tcp.h
The HAVE_LINUX_TCP_H define was not set by cmake. Closes #6252
-rw-r--r--CMakeLists.txt1
-rw-r--r--lib/curl_config.h.cmake3
-rw-r--r--lib/sendf.c2
-rw-r--r--lib/setopt.c2
4 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7a2ad440b..6a1a6fe8e 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 9bf07433c..082d76b37 100644
--- a/lib/curl_config.h.cmake
+++ b/lib/curl_config.h.cmake
@@ -473,6 +473,9 @@
/* 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
diff --git a/lib/sendf.c b/lib/sendf.c
index b6e5e7463..04cc725f5 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -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>
diff --git a/lib/setopt.c b/lib/setopt.c
index 12a268e94..58956c1e9 100644
--- a/lib/setopt.c
+++ b/lib/setopt.c
@@ -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"