From d46e6d1a55f1182b8aa2d621a2532bad3bc20ee9 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 17 May 2007 12:58:30 +0000 Subject: [PATCH] fix trivial compile errors found by randomconfig run --- include/applets.h | 6 ++++++ libbb/Kbuild | 1 + networking/ip.c | 8 ++++++++ 3 files changed, 15 insertions(+) diff --git a/include/applets.h b/include/applets.h index a7aee3a1d..99e6aceb5 100644 --- a/include/applets.h +++ b/include/applets.h @@ -176,7 +176,13 @@ USE_INETD(APPLET(inetd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) USE_INIT(APPLET(init, _BB_DIR_SBIN, _BB_SUID_NEVER)) USE_INSMOD(APPLET(insmod, _BB_DIR_SBIN, _BB_SUID_NEVER)) USE_INSTALL(APPLET(install, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) +#if ENABLE_FEATURE_IP_ADDRESS \ + || ENABLE_FEATURE_IP_ROUTE \ + || ENABLE_FEATURE_IP_LINK \ + || ENABLE_FEATURE_IP_TUNNEL \ + || ENABLE_FEATURE_IP_RULE USE_IP(APPLET(ip, _BB_DIR_BIN, _BB_SUID_NEVER)) +#endif USE_IPADDR(APPLET(ipaddr, _BB_DIR_BIN, _BB_SUID_NEVER)) USE_IPCALC(APPLET(ipcalc, _BB_DIR_BIN, _BB_SUID_NEVER)) USE_IPCRM(APPLET(ipcrm, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) diff --git a/libbb/Kbuild b/libbb/Kbuild index 5cc8d1428..e562f3222 100644 --- a/libbb/Kbuild +++ b/libbb/Kbuild @@ -120,6 +120,7 @@ lib-$(CONFIG_SELINUX) += selinux_common.o lib-$(CONFIG_AWK) += xregcomp.o lib-$(CONFIG_SED) += xregcomp.o lib-$(CONFIG_GREP) += xregcomp.o +lib-$(CONFIG_EXPR) += xregcomp.o lib-$(CONFIG_MDEV) += xregcomp.o lib-$(CONFIG_LESS) += xregcomp.o lib-$(CONFIG_DEVFSD) += xregcomp.o diff --git a/networking/ip.c b/networking/ip.c index dd1d863da..c7816c8cc 100644 --- a/networking/ip.c +++ b/networking/ip.c @@ -18,6 +18,12 @@ #include "libiproute/utils.h" #include "libiproute/ip_common.h" +#if ENABLE_FEATURE_IP_ADDRESS \ + || ENABLE_FEATURE_IP_ROUTE \ + || ENABLE_FEATURE_IP_LINK \ + || ENABLE_FEATURE_IP_TUNNEL \ + || ENABLE_FEATURE_IP_RULE + static int ATTRIBUTE_NORETURN ip_print_help(int ATTRIBUTE_UNUSED ac, char ATTRIBUTE_UNUSED **av) { bb_show_usage(); @@ -121,3 +127,5 @@ int ip_main(int argc, char **argv) } return (ip_func(argc, argv)); } + +#endif /* any of ENABLE_FEATURE_IP_xxx is 1 */ -- 2.25.1