diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/network.c | 6 | ||||
-rw-r--r-- | main/php_network.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/main/network.c b/main/network.c index c93e366cc6..636afc62b0 100644 --- a/main/network.c +++ b/main/network.c @@ -105,10 +105,6 @@ const struct in6_addr in6addr_any = {0}; /* IN6ADDR_ANY_INIT; */ # define PHP_TIMEOUT_ERROR_VALUE ETIMEDOUT #endif -#ifndef MAXHOSTNAMELEN -#define MAXHOSTNAMELEN 255 -#endif - #if HAVE_GETADDRINFO #ifdef HAVE_GAI_STRERROR # define PHP_GAI_STRERROR(x) (gai_strerror(x)) @@ -250,7 +246,7 @@ PHPAPI int php_network_getaddresses(const char *host, int socktype, struct socka #else if (!inet_aton(host, &in)) { /* XXX NOT THREAD SAFE (is safe under win32) */ - if(strlen(host) > MAXHOSTNAMELEN) { + if(strlen(host) > MAXFQDNLEN) { host_info = NULL; errno = E2BIG; } else { diff --git a/main/php_network.h b/main/php_network.h index 37ad395af0..8dc4e0aa60 100644 --- a/main/php_network.h +++ b/main/php_network.h @@ -313,6 +313,10 @@ END_EXTERN_C() /* }}} */ +#ifndef MAXFQDNLEN +#define MAXFQDNLEN 255 +#endif + #endif /* _PHP_NETWORK_H */ /* |