1
0
mirror of https://github.com/moparisthebest/curl synced 2025-01-11 05:58:01 -05:00

socketpair: fix include and define for older TCP header systems

fixed build for systems that need netinet/in.h for IPPROTO_TCP and are
missing INADDR_LOOPBACK

Closes #4480
This commit is contained in:
Harry Sintonen 2019-10-10 12:52:51 +03:00 committed by Daniel Stenberg
parent 622cf7db6b
commit 0dc14b8381
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -37,6 +37,12 @@
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h> /* IPPROTO_TCP */
#endif
#ifndef INADDR_LOOPBACK
#define INADDR_LOOPBACK 0x7f000001
#endif /* !INADDR_LOOPBACK */
#endif /* !WIN32 */
/* The last 3 #include files should be in this order */