Conditionally compiling libbb/interface.c [PATCH]

Shaun Jackman sjackman at gmail.com
Tue Oct 25 00:25:30 UTC 2005


2005/10/6, Rob Landley <rob at landley.net>:
> By which I mean the proper fix is in the makefile, not wrapping the entire
> body of the function in an #ifdef.
>
> Remember how vodz redid the dependency checking?  If libbb/interface.c is
> getting compiled when it isn't needed, something needs to be fixed with the
> dependencies.  And when libbb/interface.c _is_ needed, #ifdeffing out the
> entire body of the function is likely to cause problems.

This patch conditionally compiles libbb/interface.c. ifconfig is the
only applet that uses the only symbol exported by interface.c,
display_interfaces. Please apply. This patch supersedes the patch from
2005-04-05.

Cheers,
Shaun

2005-10-24  Shaun Jackman  <sjackman at gmail.com>

	* libbb/Makefile.in (LIBBB_SRC): Add interface.c only if
	CONFIG_IFCONFIG is defined.

Index: libbb/Makefile.in
===================================================================
--- libbb/Makefile.in	(revision 11910)
+++ libbb/Makefile.in	(working copy)
@@ -18,7 +18,7 @@
 	find_pid_by_name.c find_root_device.c fgets_str.c full_read.c \
 	full_write.c get_last_path_component.c get_line_from_file.c \
 	hash_fd.c herror_msg.c herror_msg_and_die.c \
-	human_readable.c inet_common.c inode_hash.c interface.c isdirectory.c \
+	human_readable.c inet_common.c inode_hash.c isdirectory.c \
  	kernel_version.c last_char_is.c login.c loop.c \
  	make_directory.c mode_string.c mtab.c mtab_file.c \
 	obscure.c parse_mode.c parse_number.c perror_msg.c \
@@ -37,6 +37,7 @@
 	bb_echo.c

 LIBBB_SRC-$(CONFIG_FEATURE_SHADOWPASSWDS)+= pwd2spwd.c
+LIBBB_SRC-$(CONFIG_IFCONFIG)+=interface.c

  LIBBB_OBJS=$(patsubst %.c,$(LIBBB_DIR)%.o, $(LIBBB_SRC-y))



More information about the busybox mailing list