From: Martin Kaiser <[email protected]>
054493350 ("Do not add -lresolv on non-Linux systems") adds a condition
to link with libresolv only on linux systems.
The check requires that CONFIG_UNAME_OSNAME equals Linux. This is too
strict. By default, CONFIG_UNAME_OSNAME is the output of uname -o. For most
linux systems, uname -o returns "GNU/Linux".
Modify the check to succeed if CONFIG_UNAME_OSNAME contains the word Linux.
Use findstring to search for the substring (this might be a GNU Make
extension, but it's used by busybox in other places as well).
Fixes: 054493350 ("Do not add -lresolv on non-Linux systems")
Signed-off-by: Martin Kaiser <[email protected]>
---
Makefile.flags | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.flags b/Makefile.flags
index 5673bc48a..3a7c0c77d 100644
--- a/Makefile.flags
+++ b/Makefile.flags
@@ -181,7 +181,7 @@ LDLIBS += $(if
$(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=%
endif
ifeq ($(CONFIG_FEATURE_NSLOOKUP_BIG),y)
-ifeq ($(CONFIG_UNAME_OSNAME),Linux)
+ifneq (,findstring($(CONFIG_UNAME_OSNAME),Linux))
LDLIBS += resolv
endif
endif
--
2.20.1
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox