aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremie Koenig <jk@jk.fr.eu.org>2010-05-27 15:39:24 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-07-19 00:46:47 +0200
commit29885114a5e3d22ee7aa3ab0e373e00e7cff443c (patch)
treeed98cc89711c9c3e1abbe894a571933123f7a5d5
parent84b01d5afc8230c79a1b8469c222d940c0d4e792 (diff)
downloadbusybox-w32-29885114a5e3d22ee7aa3ab0e373e00e7cff443c.tar.gz
busybox-w32-29885114a5e3d22ee7aa3ab0e373e00e7cff443c.tar.bz2
busybox-w32-29885114a5e3d22ee7aa3ab0e373e00e7cff443c.zip
libbb: conditionalize AF_* usage in error reporting
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--libbb/xfuncs_printf.c4
-rw-r--r--networking/Config.src1
2 files changed, 4 insertions, 1 deletions
diff --git a/libbb/xfuncs_printf.c b/libbb/xfuncs_printf.c
index 7069a7c8e..91f7ba22c 100644
--- a/libbb/xfuncs_printf.c
+++ b/libbb/xfuncs_printf.c
@@ -387,8 +387,12 @@ int FAST_FUNC xsocket(int domain, int type, int protocol)
387 /* Hijack vaguely related config option */ 387 /* Hijack vaguely related config option */
388#if ENABLE_VERBOSE_RESOLUTION_ERRORS 388#if ENABLE_VERBOSE_RESOLUTION_ERRORS
389 const char *s = "INET"; 389 const char *s = "INET";
390# ifdef AF_PACKET
390 if (domain == AF_PACKET) s = "PACKET"; 391 if (domain == AF_PACKET) s = "PACKET";
392# endif
393# ifdef AF_NETLINK
391 if (domain == AF_NETLINK) s = "NETLINK"; 394 if (domain == AF_NETLINK) s = "NETLINK";
395# endif
392IF_FEATURE_IPV6(if (domain == AF_INET6) s = "INET6";) 396IF_FEATURE_IPV6(if (domain == AF_INET6) s = "INET6";)
393 bb_perror_msg_and_die("socket(AF_%s,%d,%d)", s, type, protocol); 397 bb_perror_msg_and_die("socket(AF_%s,%d,%d)", s, type, protocol);
394#else 398#else
diff --git a/networking/Config.src b/networking/Config.src
index 26c59e7c1..fc613e8d3 100644
--- a/networking/Config.src
+++ b/networking/Config.src
@@ -43,7 +43,6 @@ config FEATURE_PREFER_IPV4_ADDRESS
43config VERBOSE_RESOLUTION_ERRORS 43config VERBOSE_RESOLUTION_ERRORS
44 bool "Verbose resolution errors" 44 bool "Verbose resolution errors"
45 default n 45 default n
46 depends on PLATFORM_LINUX #because of xsocket() in libbb/xfuncs_prinf.c
47 help 46 help
48 Enable if you are not satisfied with simplistic 47 Enable if you are not satisfied with simplistic
49 "can't resolve 'hostname.com'" and want to know more. 48 "can't resolve 'hostname.com'" and want to know more.