summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-19 21:25:55 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-19 21:25:55 +0000
commit26af93734e5338ba01fd01b3352f5871c6ce65ef (patch)
tree58b5fb73ff80523e16d6f7d09427bece733f3bc7
parent7cc856ea2f1808e98387ea66537ecbc6c3de2f88 (diff)
downloadnuttx-26af93734e5338ba01fd01b3352f5871c6ce65ef.tar.gz
nuttx-26af93734e5338ba01fd01b3352f5871c6ce65ef.tar.bz2
nuttx-26af93734e5338ba01fd01b3352f5871c6ce65ef.zip
Misc build fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3402 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--nuttx/arch/sim/src/up_netdev.c6
-rw-r--r--nuttx/arch/sim/src/up_tapdev.c35
-rw-r--r--nuttx/configs/olimex-lpc1766stk/slip-httpd/appconfig2
3 files changed, 23 insertions, 20 deletions
diff --git a/nuttx/arch/sim/src/up_netdev.c b/nuttx/arch/sim/src/up_netdev.c
index 742492971..8758facc4 100644
--- a/nuttx/arch/sim/src/up_netdev.c
+++ b/nuttx/arch/sim/src/up_netdev.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * up_tapdev.c
+ * arch/sim/src/up_tapdev.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -44,6 +44,10 @@
* Private Definitions
****************************************************************************/
+#ifndef NULL
+# define NULL (void*)0
+#endif
+
/****************************************************************************
* Private Types
****************************************************************************/
diff --git a/nuttx/arch/sim/src/up_tapdev.c b/nuttx/arch/sim/src/up_tapdev.c
index fd85a973e..9c88245b1 100644
--- a/nuttx/arch/sim/src/up_tapdev.c
+++ b/nuttx/arch/sim/src/up_tapdev.c
@@ -135,33 +135,32 @@ static inline void dump_ethhdr(const char *msg, unsigned char *buf, int buflen)
static int up_setmacaddr(void)
{
- unsigned char macaddr[6];
+ int sockfd;
int ret = -1;
- if (macaddr)
- {
- /* Get a socket (only so that we get access to the INET subsystem) */
- int sockfd = socket(PF_INET, SOCK_DGRAM, 0);
- if (sockfd >= 0)
- {
- struct ifreq req;
- memset(&req, 0, sizeof(struct ifreq));
+ /* Get a socket (only so that we get access to the INET subsystem) */
+
+ sockfd = socket(PF_INET, SOCK_DGRAM, 0);
+ if (sockfd >= 0)
+ {
+ struct ifreq req;
+ memset(&req, 0, sizeof(struct ifreq));
- /* Put the driver name into the request */
+ /* Put the driver name into the request */
- strncpy(req.ifr_name, "tap0", IFNAMSIZ);
+ strncpy(req.ifr_name, "tap0", IFNAMSIZ);
- /* Perform the ioctl to get the MAC address */
+ /* Perform the ioctl to get the MAC address */
- ret = ioctl(sockfd, SIOCGIFHWADDR, (unsigned long)&req);
- if (!ret)
- {
- /* Set the MAC address */
+ ret = ioctl(sockfd, SIOCGIFHWADDR, (unsigned long)&req);
+ if (!ret)
+ {
+ /* Set the MAC address */
- ret = uipdriver_setmacaddr(&req.ifr_hwaddr.sa_data);
- }
+ ret = uipdriver_setmacaddr(&req.ifr_hwaddr.sa_data);
}
}
+
return ret;
}
diff --git a/nuttx/configs/olimex-lpc1766stk/slip-httpd/appconfig b/nuttx/configs/olimex-lpc1766stk/slip-httpd/appconfig
index 08e7caeb3..ab3406381 100644
--- a/nuttx/configs/olimex-lpc1766stk/slip-httpd/appconfig
+++ b/nuttx/configs/olimex-lpc1766stk/slip-httpd/appconfig
@@ -36,4 +36,4 @@
# Networking support
CONFIGURED_APPS += netutils/uiplib=.built_always
-CONFIGURED_APPS += netutils/thttps=.built_always
+CONFIGURED_APPS += netutils/thttpd=.built_always