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>
This commit is contained in:
Jeremie Koenig authored and Denys Vlasenko committed 2010-07-19 00:46:47 +02:00
1 parent 84b01d5afc
commit 29885114a5
2 files changed
+4 -1

No files matched your search

+4
View File
@@ -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