From 3e32e050072dcda6790295188d3bf7ba11e477f6 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 15 Nov 2014 13:52:39 -0600 Subject: Network: Various fixes for clean compile with both Ethernet and SLIP --- apps/examples/thttpd/thttpd_main.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'apps/examples') 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 */ -- cgit v1.2.3