You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
522 B
14 lines
522 B
--- src/libnet_resolve.c.orig Tue Aug 20 16:56:01 2002 |
|
+++ src/libnet_resolve.c Tue Aug 20 16:56:01 2002 |
|
@@ -218,7 +218,11 @@ |
|
|
|
if (use_name == LIBNET_RESOLVE) |
|
{ |
|
+#if defined(__FreeBSD__) || defined(__linux__) |
|
if (!(host_ent = gethostbyname2(host_name, AF_INET6))) |
|
+#else |
|
+ if (!(host_ent = gethostbyname(host_name)) || host_ent->h_addrtype != AF_INET6) |
|
+#endif |
|
{ |
|
snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, |
|
"libnet_name2addr6(): %s", strerror(errno));
|
|
|