summaryrefslogtreecommitdiff
path: root/nuttx/examples/wget
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-03-28 13:14:13 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-03-28 13:14:13 +0000
commit5ab468aaa6e626a86bfb10785dee660e57d894c0 (patch)
treeab39ace437376d68d309af056f73c5354e5103ee /nuttx/examples/wget
parentf53b2945a7d9f1f7cfb4892e7aa3bca711a95e67 (diff)
downloadpx4-nuttx-5ab468aaa6e626a86bfb10785dee660e57d894c0.tar.gz
px4-nuttx-5ab468aaa6e626a86bfb10785dee660e57d894c0.tar.bz2
px4-nuttx-5ab468aaa6e626a86bfb10785dee660e57d894c0.zip
Fix examples/wget build
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1649 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples/wget')
-rw-r--r--nuttx/examples/wget/Makefile.host2
-rw-r--r--nuttx/examples/wget/target.c17
2 files changed, 17 insertions, 2 deletions
diff --git a/nuttx/examples/wget/Makefile.host b/nuttx/examples/wget/Makefile.host
index 057649902..267a4e435 100644
--- a/nuttx/examples/wget/Makefile.host
+++ b/nuttx/examples/wget/Makefile.host
@@ -40,7 +40,7 @@ include $(TOPDIR)/Make.defs
OBJS = host.o1 webclient.o1
BIN = wget
-HOSTCFLAGS += -DCONFIG_NETUTILS_WEBCLIENT_HOST=1
+HOSTCFLAGS += -DCONFIG_WEBCLIENT_HOST=1
HOSTCFLAGS += -I. -include hostdefs.h
VPATH = $(TOPDIR)/netutils/webclient:.
diff --git a/nuttx/examples/wget/target.c b/nuttx/examples/wget/target.c
index 68bd47f4a..9f0b69b40 100644
--- a/nuttx/examples/wget/target.c
+++ b/nuttx/examples/wget/target.c
@@ -40,6 +40,7 @@
#include <nuttx/config.h>
#include <sys/types.h>
+#include <unistd.h>
#include <netinet/in.h>
#include <arpa/inet.h>
@@ -87,6 +88,21 @@
static char g_iobuffer[512];
/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+/****************************************************************************
+ * Name: callback
+ ****************************************************************************/
+
+static void callback(FAR char **buffer, int offset, int datend, FAR int *buflen)
+{
+ (void)write(1, &((*buffer)[offset]), datend - offset);
+}
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+/****************************************************************************
* user_initialize
****************************************************************************/
@@ -106,7 +122,6 @@ void user_initialize(void)
int user_start(int argc, char *argv[])
{
struct in_addr addr;
- static uip_ipaddr_t addr;
#if defined(CONFIG_EXAMPLE_WGET_NOMAC)
uint8 mac[IFHWADDRLEN];
#endif