php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62025 __ss_family was changed on AIX 5.3
Submitted: 2012-05-14 13:51 UTC Modified: 2012-05-21 11:47 UTC
From: lior dot k at zend dot com Assigned: felipe
Status: Closed Package: Sockets related
PHP Version: 5.4.3 OS: AIX
Private report: No CVE-ID:
 [2012-05-14 13:51 UTC] 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



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-05-14 13:53 UTC] lior dot k at zend dot com
-Operating System: +Operating System: AIX
 [2012-05-14 13:53 UTC] lior dot k at zend dot com
Setting OS to AIX.
 [2012-05-14 14:13 UTC] 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-20 22:38 UTC] felipe@php.net
-Summary: FTBS on AIX +Summary: __ss_family was changed on AIX 5.3
 [2012-05-20 22:45 UTC] 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-20 22:45 UTC] 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:47 UTC] felipe@php.net
I've pushed a fix to git, can you test it and provide a feedback? Thanks.
 [2012-05-20 22:47 UTC] felipe@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: felipe
 [2012-05-21 11:34 UTC] lior dot k at zend dot com
The define in sockets.c should test for "_AIX" not "AIX". See my original patch. 

Other than this, it works fine on AIX 5.1.
 [2012-05-21 11:34 UTC] lior dot k at zend dot com
-Status: Feedback +Status: Assigned
 [2012-05-21 11:47 UTC] felipe@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

Thanks for testing!
 [2012-05-21 11:47 UTC] felipe@php.net
-Status: Assigned +Status: Closed
 [2012-07-24 23:36 UTC] rasmus@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)
 [2013-11-17 09:32 UTC] laruence@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)
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Thu Apr 17 06:02:13 2014 UTC