Commit 427982d6 authored by Chris's avatar Chris

Remplacement du type 'long' par le type 'in_addr_t' concernant la variable...

Remplacement du type 'long' par le type 'in_addr_t' concernant la variable hostAddr ; ce remplacement est necessaire pour la compilation 64 bit
parent 308ae49d
...@@ -182,7 +182,7 @@ ZEND_FUNCTION(mail_php) ...@@ -182,7 +182,7 @@ ZEND_FUNCTION(mail_php)
struct sockaddr_in serverSockAddr; /* Socket Address */ struct sockaddr_in serverSockAddr; /* Socket Address */
struct hostent *serverHostEnt; /* Host description */ struct hostent *serverHostEnt; /* Host description */
unsigned long hostAddr; /* Hostname address */ in_addr_t hostAddr; /* Hostname address */
bzero(&serverSockAddr,sizeof(serverSockAddr)); bzero(&serverSockAddr,sizeof(serverSockAddr));
/* IP address to long integer conversion */ /* IP address to long integer conversion */
...@@ -195,7 +195,7 @@ ZEND_FUNCTION(mail_php) ...@@ -195,7 +195,7 @@ ZEND_FUNCTION(mail_php)
hostAddr = inet_addr(INI_STR("mail_php.smtp_server")); hostAddr = inet_addr(INI_STR("mail_php.smtp_server"));
} }
if ( (long)hostAddr != (long)-1) if ( (in_addr_t)hostAddr != (in_addr_t)-1)
bcopy(&hostAddr,&serverSockAddr.sin_addr,sizeof(hostAddr)); bcopy(&hostAddr,&serverSockAddr.sin_addr,sizeof(hostAddr));
else /* If a name is given */ else /* If a name is given */
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment