Bug #62025 [Opn->Fbk]: __ss_family was changed on AIX 5.3

From: Date: Sun, 20 May 2012 22:47:27 +0000
Subject: Bug #62025 [Opn->Fbk]: __ss_family was changed on AIX 5.3
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-170618@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62025&edit=1

 ID:                 62025
 Updated by:         felipe@php.net
 Reported by:        lior dot k at zend dot com
 Summary:            __ss_family was changed on AIX 5.3
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            Sockets related
 Operating System:   AIX
 PHP Version:        5.4.3
-Assigned To:        
+Assigned To:        felipe
 Block user comment: N
 Private report:     N

 New Comment:

I've pushed a fix to git, can you test it and provide a feedback? Thanks.


Previous Comments:
------------------------------------------------------------------------
[2012-05-20 22:45:44] felipe@php.net

Automatic comment on behalf of felipensp@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=f3615bc6f7079e8e9c8940a80b011de1e01951d3
Log: - Fixed bug #62025 (__ss_family was changed on AIX 5.3)

------------------------------------------------------------------------
[2012-05-20 22:45:43] felipe@php.net

Automatic comment on behalf of felipensp@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ffe8303f24bd1db8af1e64e99c9f7edca4940d95
Log: - Fixed bug #62025 (__ss_family was changed on AIX 5.3)

------------------------------------------------------------------------
[2012-05-14 14:13:50] lior dot k at zend dot com

That's __ss_family on AIX 5.1, on AIX 5.3 it's the same other OSes.

------------------------------------------------------------------------
[2012-05-14 13:53:12] lior dot k at zend dot com

Setting OS to AIX.

------------------------------------------------------------------------
[2012-05-14 13:51:29] lior dot k at zend dot com

Description:
------------
Hi,

I had a problem building the sockets extension on AIX (tested with 5.4.0RC8, but the code
didn't change 5.4.1 or 5.4.3).

The problem is that ss_family is called __ss_family on aix. The following small but ugly patch did
the work, but probably should be applied in a more clean way.

diff -ruw php-5.4.0RC8.orig/ext/sockets/sockets.c php-5.4.0RC8/ext/sockets/sockets.c
--- php-5.4.0RC8.orig/ext/sockets/sockets.c     2012-01-01 15:15:04.000000000 +0200
+++ php-5.4.0RC8/ext/sockets/sockets.c  2012-05-13 11:51:35.750746776 +0300
@@ -77,6 +77,9 @@
 # define IS_INVALID_SOCKET(a)  (a->bsd_socket < 0)
 # define set_errno(a) (errno = a)
 # include "php_sockets.h"
+# ifdef _AIX
+#  define ss_family __ss_family
+# endif
 # if HAVE_IF_NAMETOINDEX
 #  include <net/if.h>
 # endif

Lior Kaplan
Zend Inc




------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62025&edit=1


Thread (6 messages)

« previous php.bugs (#170618) next »