From 29885114a5e3d22ee7aa3ab0e373e00e7cff443c Mon Sep 17 00:00:00 2001 From: Jeremie Koenig Date: Thu, 27 May 2010 15:39:24 +0200 Subject: libbb: conditionalize AF_* usage in error reporting Signed-off-by: Jeremie Koenig Signed-off-by: Denys Vlasenko --- libbb/xfuncs_printf.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libbb') diff --git a/libbb/xfuncs_printf.c b/libbb/xfuncs_printf.c index 7069a7c..91f7ba2 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 -- cgit v1.1