On Thu, Oct 27, 2005 at 09:00:00PM -0400, Philippe Cl??ri?? wrote:
> Isn't this a bit dated though? I figured that if that has not been 
> included yet it has other problems. 

indeed, this should have been resolved a while ago

try the attached patch which i gave a quick spin in my uclibc env with 
php-4.4.x and php-4.3.x
-mike
Only use the dn_skipname() function if it's available (it isnt in uClibc)

This fix is in the 5.0+ branches, but not in the 4.3/4.4 ones

--- ext/standard/dns.c
+++ ext/standard/dns.c
@@ -275,6 +275,7 @@ PHP_FUNCTION(checkdnsrr)
 #define MAXHOSTNAMELEN  256
 #endif /* MAXHOSTNAMELEN */
 
+#if HAVE_DN_SKIPNAME
 /* {{{ proto int getmxrr(string hostname, array mxhosts [, array weight])
    Get MX records corresponding to a given Internet host name */
 PHP_FUNCTION(getmxrr)
@@ -355,6 +356,7 @@ PHP_FUNCTION(getmxrr)
        RETURN_TRUE;
 }
 /* }}} */
+#endif /* HAVE_DN_SKIPNAME */
 
 #endif
 /*
--- ext/standard/basic_functions.c
+++ ext/standard/basic_functions.c
@@ -449,7 +449,9 @@ function_entry basic_functions[] = {
 
 #if HAVE_RES_SEARCH && !(defined(__BEOS__) || defined(PHP_WIN32) || 
defined(NETWARE))
        PHP_FE(checkdnsrr,                                                      
                                                        NULL)
+# if HAVE_DN_SKIPNAME
        PHP_FE(getmxrr,second_and_third_args_force_ref)
+# endif
 #endif
 
        PHP_FE(getmyuid,                                                        
                                                        NULL)

Reply via email to