aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-07-27 06:55:36 +0000
committerlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-07-27 06:55:36 +0000
commit300aae2232c5cc68cf81977576abf47fc164283b (patch)
tree8467a696b1990e665391d4fcde21c8f176f27cd1 /networking
parent09025ea0803794f49cca3a4ad652b1e8f9067eb4 (diff)
downloadbusybox-w32-300aae2232c5cc68cf81977576abf47fc164283b.tar.gz
busybox-w32-300aae2232c5cc68cf81977576abf47fc164283b.tar.bz2
busybox-w32-300aae2232c5cc68cf81977576abf47fc164283b.zip
#ifdef reduction infrastructure, based on an argument between Shaun Jackman,
Rob Landley, and others. Currently CONFIG options are defined or undefined, so we chop out code with #ifdefs, ala: #ifdef CONFIG_THING stuff(); #endif This creates a new header file, bb_config.h, which sets the CONFIG entry to 1 or 0, and lets us do: if(CONFIG_THING) stuff(); And let the compiler do dead code elimination to get rid of it. (Note: #ifdef will still work because for the 1 case it's a static const int, not a #define.) git-svn-id: svn://busybox.net/trunk/busybox@10929 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'networking')
-rw-r--r--networking/ifconfig.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/networking/ifconfig.c b/networking/ifconfig.c
index fc7798f2d..1b43a0825 100644
--- a/networking/ifconfig.c
+++ b/networking/ifconfig.c
@@ -37,6 +37,7 @@
37#include <string.h> /* strcmp and friends */ 37#include <string.h> /* strcmp and friends */
38#include <ctype.h> /* isdigit and friends */ 38#include <ctype.h> /* isdigit and friends */
39#include <stddef.h> /* offsetof */ 39#include <stddef.h> /* offsetof */
40#include <unistd.h>
40#include <netdb.h> 41#include <netdb.h>
41#include <sys/ioctl.h> 42#include <sys/ioctl.h>
42#include <net/if.h> 43#include <net/if.h>
@@ -558,6 +559,7 @@ int ifconfig_main(int argc, char **argv)
558 continue; 559 continue;
559 } /* end of while-loop */ 560 } /* end of while-loop */
560 561
562 if (CONFIG_FEATURE_CLEAN_UP) close(sockfd);
561 return goterr; 563 return goterr;
562} 564}
563 565