You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by je...@apache.org on 2020/09/30 06:22:26 UTC

[incubator-nuttx-apps] 01/04: webclient: move WGET_USE_URLENCODE definiton to the header

This is an automated email from the ASF dual-hosted git repository.

jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit b78370dbf2475e3ce31dc93d703dc704e32e34a1
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Sep 29 16:56:56 2020 +0900

    webclient: move WGET_USE_URLENCODE definiton to the header
    
    Because it's used by the header.
    
    This fixes warnings while building wgetjson.
---
 include/netutils/webclient.h   | 6 ++++++
 netutils/webclient/webclient.c | 1 -
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/netutils/webclient.h b/include/netutils/webclient.h
index f53ed46..bdf05b3 100644
--- a/include/netutils/webclient.h
+++ b/include/netutils/webclient.h
@@ -69,6 +69,12 @@
 #  define CONFIG_WEBCLIENT_MAXFILENAME 100
 #endif
 
+#if defined(CONFIG_NETUTILS_CODECS)
+#  if defined(CONFIG_CODECS_URLCODE)
+#    define WGET_USE_URLENCODE 1
+#  endif
+#endif
+
 /****************************************************************************
  * Public types
  ****************************************************************************/
diff --git a/netutils/webclient/webclient.c b/netutils/webclient/webclient.c
index 0a70d0e..1bb67c1 100644
--- a/netutils/webclient/webclient.c
+++ b/netutils/webclient/webclient.c
@@ -75,7 +75,6 @@
 
 #if defined(CONFIG_NETUTILS_CODECS)
 #  if defined(CONFIG_CODECS_URLCODE)
-#    define WGET_USE_URLENCODE 1
 #    include "netutils/urldecode.h"
 #  endif
 #  if defined(CONFIG_CODECS_BASE64)