cvs: php4 /ext/standard/ dns.c

From: Date: Wed, 17 May 2000 16:08:42 +0000
Subject: cvs: php4 /ext/standard/ dns.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-15129@lists.php.net to get a copy of this message
sas Wed May 17 18:08:42 2000 EDT Modified files: /php4/ext/standard dns.c Log: Fix 64-bit issue in gethostbyaddr(). Index: php4/ext/standard/dns.c diff -u php4/ext/standard/dns.c:1.16 php4/ext/standard/dns.c:1.17 --- php4/ext/standard/dns.c:1.16 Sat Mar 11 21:48:49 2000 +++ php4/ext/standard/dns.c Wed May 17 18:08:42 2000 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dns.c,v 1.16 2000/03/11 20:48:49 andi Exp $ */ +/* $Id: dns.c,v 1.17 2000/05/17 16:08:42 sas Exp $ */ #include "php.h" #if HAVE_SYS_SOCKET_H @@ -71,10 +71,11 @@ char *php_gethostbyaddr(char *ip) { - unsigned long addr; + struct in_addr addr; struct hostent *hp; - if ((int) (addr = inet_addr(ip)) == -1) { + addr.s_addr = inet_addr(ip); + if (addr.s_addr == -1) { #if PHP_DEBUG php_error(E_WARNING, "address not in a.b.c.d form"); #endif

« previous php.version4 (#15129) next »