summaryrefslogtreecommitdiff
path: root/libbb
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 /libbb
parent84b01d5afc8230c79a1b8469c222d940c0d4e792 (diff)
downloadbusybox-29885114a5e3d22ee7aa3ab0e373e00e7cff443c.tar.gz
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>
Diffstat (limited to 'libbb')
-rw-r--r--libbb/xfuncs_printf.c4
1 files changed, 4 insertions, 0 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)
/* Hijack vaguely related config option */
#if ENABLE_VERBOSE_RESOLUTION_ERRORS
const char *s = "INET";
+# ifdef AF_PACKET
if (domain == AF_PACKET) s = "PACKET";
+# endif
+# ifdef AF_NETLINK
if (domain == AF_NETLINK) s = "NETLINK";
+# endif
IF_FEATURE_IPV6(if (domain == AF_INET6) s = "INET6";)
bb_perror_msg_and_die("socket(AF_%s,%d,%d)", s, type, protocol);
#else