aboutsummaryrefslogtreecommitdiff
path: root/lib/socketpair.c
diff options
context:
space:
mode:
authorXiang Xiao <xiaoxiang@xiaomi.com>2019-12-24 21:28:32 +0800
committerJay Satiro <raysatiro@yahoo.com>2019-12-27 22:52:31 -0500
commit4b463992e59ad8338618b71a314d15c20525787a (patch)
tree036edb25173f532e5643ccf03b2d444e7619cc9c /lib/socketpair.c
parent779b415a2a7801b5702de4f6241bf2c3206ca8db (diff)
lib: fix warnings found when porting to NuttX
- Undefine DEBUGASSERT in curl_setup_once.h in case it was already defined as a system macro. - Don't compile write32_le in curl_endian unless CURL_SIZEOF_CURL_OFF_T > 4, since it's only used by Curl_write64_le. - Include <arpa/inet.h> in socketpair.c. Closes https://github.com/curl/curl/pull/4756
Diffstat (limited to 'lib/socketpair.c')
-rw-r--r--lib/socketpair.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/socketpair.c b/lib/socketpair.c
index 1f0e2e4a4..1ec0d75a4 100644
--- a/lib/socketpair.c
+++ b/lib/socketpair.c
@@ -40,6 +40,9 @@
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h> /* IPPROTO_TCP */
#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
#ifndef INADDR_LOOPBACK
#define INADDR_LOOPBACK 0x7f000001
#endif /* !INADDR_LOOPBACK */