[BusyBox] Conditionally compiling libbb/interface.c [PATCH]

Shaun Jackman sjackman at gmail.com
Tue Apr 5 18:06:44 UTC 2005


libbb/interface.c does not compile with newlib due to a number of
undefined structures, structure members, and preprocessor definitions.
libbb/interface.o could be conditionally compiled only if it's needed
by an applet, but the framework is not currently in busybox to
conditionally compile library objects. A simple solution is to wrap
interface.c in an indicative ifdef. I used SIOCGIFCONF for this
purpose. This is not the one and only solution though, so do speak up
if anyone has another suggestion.

Cheers,
Shaun

2005-04-05  Shaun Jackman  <sjackman at gmail.com>

	* libbb/interface.c: Compile if SIOCGIFCONF is defined.

Index: libbb/interface.c
===================================================================
--- libbb/interface.c	(revision 10071)
+++ libbb/interface.c	(working copy)
@@ -75,6 +75,8 @@
 #include <net/if_arp.h>
  #include "libbb.h"
 
+#ifdef SIOCGIFCONF
+
  #ifdef CONFIG_FEATURE_IPV6
 # define HAVE_AFINET6 1
 #else
@@ -2081,3 +2083,5 @@
  	close(skfd);
 	exit(status < 0);
 }
+
+#endif /* SIOCGIFCONF */



More information about the busybox mailing list