components/proftpd/patches/getipnodebyname.patch
changeset 1343 a66d36656846
parent 1342 1b53e0a91d50
child 1344 48d2ae15d995
--- a/components/proftpd/patches/getipnodebyname.patch	Thu Jun 13 06:49:48 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
---- a/src/netaddr.c
-+++ b/src/netaddr.c
-@@ -1295,12 +1295,19 @@ const char *pr_netaddr_get_dnsstr(pr_netaddr_t *na) {
-     buf[sizeof(buf)-1] = '\0';
- 
-     if (res == 0) {
-+      int err_num;
-+      int flags;
-       char **checkaddr;
-       struct hostent *hent = NULL;
-       unsigned char ok = FALSE;
-       int family = pr_netaddr_get_family(na);
-       void *inaddr = pr_netaddr_get_inaddr(na);
--    
-+
-+//#ifdef HAVE_GETIPNODEBYNAME
-+#if 1
-+      flags=AI_V4MAPPED;
-+      hent=getipnodebyname(buf, family, flags, &err_num);
-+#else
- #ifdef HAVE_GETHOSTBYNAME2
-       if (pr_netaddr_is_v4mappedv6(na) == TRUE) {
-         family = AF_INET;
-@@ -1311,6 +1318,7 @@ const char *pr_netaddr_get_dnsstr(pr_netaddr_t *na) {
- #else
-       hent = gethostbyname(buf);
- #endif /* HAVE_GETHOSTBYNAME2 */
-+#endif /* HAVE_GETIPNODEBYNAME */
- 
-       if (hent != NULL) {
- 
-