From 0dc14b83818f6166d60e939ce2cc1c4806d39c4a Mon Sep 17 00:00:00 2001 From: Harry Sintonen Date: Thu, 10 Oct 2019 12:52:51 +0300 Subject: 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 --- lib/socketpair.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/socketpair.c') 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 #endif +#ifdef HAVE_NETINET_IN_H +#include /* 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 */ -- cgit v1.2.3