1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-24 00:58:48 -05:00

cmake: check for linux/tcp.h

The HAVE_LINUX_TCP_H define was not set by cmake.

Closes #6252
This commit is contained in:
Klaus Crusius 2020-11-28 18:17:11 +01:00 committed by Daniel Stenberg
parent 221c9da9af
commit d6bfbfadd3
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
4 changed files with 8 additions and 0 deletions

View 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("netdb.h" HAVE_NETDB_H)
check_include_file_concat("netinet/in.h" HAVE_NETINET_IN_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_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("pem.h" HAVE_PEM_H)
check_include_file_concat("poll.h" HAVE_POLL_H) check_include_file_concat("poll.h" HAVE_POLL_H)

View File

@ -473,6 +473,9 @@
/* Define to 1 if you have the <netinet/tcp.h> header file. */ /* Define to 1 if you have the <netinet/tcp.h> header file. */
#cmakedefine HAVE_NETINET_TCP_H 1 #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. */ /* Define to 1 if you have the <net/if.h> header file. */
#cmakedefine HAVE_NET_IF_H 1 #cmakedefine HAVE_NET_IF_H 1

View File

@ -28,6 +28,8 @@
#ifdef HAVE_LINUX_TCP_H #ifdef HAVE_LINUX_TCP_H
#include <linux/tcp.h> #include <linux/tcp.h>
#elif defined(HAVE_NETINET_TCP_H)
#include <netinet/tcp.h>
#endif #endif
#include <curl/curl.h> #include <curl/curl.h>

View File

@ -30,6 +30,8 @@
#ifdef HAVE_LINUX_TCP_H #ifdef HAVE_LINUX_TCP_H
#include <linux/tcp.h> #include <linux/tcp.h>
#elif defined(HAVE_NETINET_TCP_H)
#include <netinet/tcp.h>
#endif #endif
#include "urldata.h" #include "urldata.h"