[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 05/29: lib: fix warnings found when porting to NuttX
From: |
gnunet |
Subject: |
[gnurl] 05/29: lib: fix warnings found when porting to NuttX |
Date: |
Fri, 10 Jan 2020 23:05:43 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 4b463992e59ad8338618b71a314d15c20525787a
Author: Xiang Xiao <address@hidden>
AuthorDate: Tue Dec 24 21:28:32 2019 +0800
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
---
lib/curl_endian.c | 2 +-
lib/curl_setup_once.h | 1 +
lib/socketpair.c | 3 +++
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/curl_endian.c b/lib/curl_endian.c
index b7563b3de..a774d136e 100644
--- a/lib/curl_endian.c
+++ b/lib/curl_endian.c
@@ -81,6 +81,7 @@ unsigned short Curl_read16_be(const unsigned char *buf)
((unsigned short)buf[1]));
}
+#if (CURL_SIZEOF_CURL_OFF_T > 4)
/*
* write32_le()
*
@@ -100,7 +101,6 @@ static void write32_le(const int value, unsigned char
*buffer)
buffer[3] = (char)((value & 0xFF000000) >> 24);
}
-#if (CURL_SIZEOF_CURL_OFF_T > 4)
/*
* Curl_write64_le()
*
diff --git a/lib/curl_setup_once.h b/lib/curl_setup_once.h
index 8db74e9b4..8890f3890 100644
--- a/lib/curl_setup_once.h
+++ b/lib/curl_setup_once.h
@@ -374,6 +374,7 @@ typedef int sig_atomic_t;
* Macro used to include assertion code only in debug builds.
*/
+#undef DEBUGASSERT
#if defined(DEBUGBUILD) && defined(HAVE_ASSERT_H)
#define DEBUGASSERT(x) assert(x)
#else
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 */
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] branch master updated (71b588320 -> 697584161), gnunet, 2020/01/10
- [gnurl] 01/29: url2file.c: fix copyright year, gnunet, 2020/01/10
- [gnurl] 04/29: os400: Add missing CURLE error constants, gnunet, 2020/01/10
- [gnurl] 03/29: CURLOPT_HEADERFUNCTION.3: Document that size is always 1, gnunet, 2020/01/10
- [gnurl] 02/29: examples/postinmemory.c: Call curl_global_cleanup always, gnunet, 2020/01/10
- [gnurl] 07/29: tool_operate: fix mem leak when failed config parse, gnunet, 2020/01/10
- [gnurl] 05/29: lib: fix warnings found when porting to NuttX,
gnunet <=
- [gnurl] 06/29: lib: remove erroneous +x file permission on some c files, gnunet, 2020/01/10
- [gnurl] 09/29: bearssl: Improve I/O handling, gnunet, 2020/01/10
- [gnurl] 10/29: tests: Change NTLM tests to require SSL, gnunet, 2020/01/10
- [gnurl] 08/29: travis: Fix error detection, gnunet, 2020/01/10
- [gnurl] 11/29: tool: make a few char pointers point to const char instead, gnunet, 2020/01/10
- [gnurl] 23/29: file: fix copyright year range, gnunet, 2020/01/10
- [gnurl] 12/29: tests: Fix bounce requests with truncated writes, gnunet, 2020/01/10
- [gnurl] 21/29: file: on Windows, refuse paths that start with \\, gnunet, 2020/01/10
- [gnurl] 20/29: CURLOPT_READFUNCTION.3: fix fopen params in example, gnunet, 2020/01/10
- [gnurl] 19/29: CURLOPT_READFUNCTION.3: fix variable name in example, gnunet, 2020/01/10