diff options
author | Harry Sintonen <sintonen@iki.fi> | 2019-10-10 12:52:51 +0300 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-10-10 23:20:15 +0200 |
commit | 0dc14b83818f6166d60e939ce2cc1c4806d39c4a (patch) | |
tree | 4af162e02528727456e14ced5c854fd3538295fc /lib/socketpair.c | |
parent | 622cf7db6bd2d943e67660020b3984e6068f1084 (diff) | |
download | curl-0dc14b83818f6166d60e939ce2cc1c4806d39c4a.tar.gz |
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
Diffstat (limited to 'lib/socketpair.c')
-rw-r--r-- | lib/socketpair.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/socketpair.c b/lib/socketpair.c index ffdfdad7f..1f0e2e4a4 100644 --- a/lib/socketpair.c +++ b/lib/socketpair.c @@ -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 */ |