summaryrefslogtreecommitdiff
path: root/apps/examples
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-11-15 13:52:39 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-11-15 13:52:39 -0600
commit3e32e050072dcda6790295188d3bf7ba11e477f6 (patch)
tree0850aa6f9df6b95493be9e67bde721f3c856ea2f /apps/examples
parent24a33a43436bcc8430c5c1e6707dedc8c2531171 (diff)
downloadnuttx-3e32e050072dcda6790295188d3bf7ba11e477f6.tar.gz
nuttx-3e32e050072dcda6790295188d3bf7ba11e477f6.tar.bz2
nuttx-3e32e050072dcda6790295188d3bf7ba11e477f6.zip
Network: Various fixes for clean compile with both Ethernet and SLIP
Diffstat (limited to 'apps/examples')
-rw-r--r--apps/examples/thttpd/thttpd_main.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/apps/examples/thttpd/thttpd_main.c b/apps/examples/thttpd/thttpd_main.c
index e2778093a..89677f855 100644
--- a/apps/examples/thttpd/thttpd_main.c
+++ b/apps/examples/thttpd/thttpd_main.c
@@ -95,13 +95,24 @@
# error "You must not disable loadable modules via CONFIG_BINFMT_DISABLE in your configuration file"
#endif
-/* SLIP-specific configuration */
+/* Ethernet specific configuration */
-#ifdef CONFIG_NET_SLIP
+#ifdef CONFIG_NET_ETHERNET
+
+ /* Otherwise, use the standard Ethernet device name */
+
+# define NET_DEVNAME "eth0"
+
+#else
- /* No MAC address operations */
+ /* No Ethernet -> No MAC address operations */
# undef CONFIG_EXAMPLES_THTTPD_NOMAC
+#endif
+
+/* SLIP-specific configuration */
+
+#ifdef CONFIG_NET_SLIP
/* TTY device to use */
@@ -110,12 +121,10 @@
# endif
# define SLIP_DEVNO 0
-# define NET_DEVNAME "sl0"
-#else
-
- /* Otherwise, use the standard ethernet device name */
-# define NET_DEVNAME "eth0"
+# ifndef NET_DEVNAME
+# define NET_DEVNAME "sl0"
+# endif
#endif
/* Describe the ROMFS file system */