php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60048 sa_len a #define on IRIX
Submitted: 2011-10-13 07:50 UTC Modified: 2011-10-13 22:49 UTC
From: china at thewrittenword dot com Assigned: felipe (profile)
Status: Closed Package: Sockets related
PHP Version: 5.3.8 OS: IRIX 6.5
Private report: No CVE-ID: None
 [2011-10-13 07:50 UTC] china at thewrittenword dot com
Description:
------------
<sys/socket.h> on IRIX 6.5 defines sa_len as:
  #define sa_len sa_union.sa_generic.sa_len2

Because of this, socket_accept() in ext/sockets/sockets.c cannot be compiled on this platform because it uses sa_len as a variable:
  PHP_FUNCTION(socket_accept)
  {
          zval                             *arg1;
          php_socket                       *php_sock, *new_sock;
          php_sockaddr_storage sa;
          socklen_t                        sa_len = sizeof(sa);

The obvious fix is to rename "sa_len" to something like php_sa_len.


Patches

socket-patch (last revision 2011-10-13 07:51 UTC by china at thewrittenword dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-10-13 22:49 UTC] felipe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: felipe
 [2011-10-13 22:49 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.


 [2011-10-13 22:56 UTC] felipe@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=318094
Log: - Fixed bug #60048 (sa_len a #define on IRIX)
  patch by: china at thewrittenword dot com
 [2012-04-18 09:48 UTC] laruence@php.net
Automatic comment on behalf of felipe
Revision: http://git.php.net/?p=php-src.git;a=commit;h=cce94408e6f9cd18139b7fb82b588c8db89ab0e7
Log: - Fixed bug #60048 (sa_len a #define on IRIX)   patch by: china at thewrittenword dot com
 [2012-07-24 23:39 UTC] rasmus@php.net
Automatic comment on behalf of felipe
Revision: http://git.php.net/?p=php-src.git;a=commit;h=cce94408e6f9cd18139b7fb82b588c8db89ab0e7
Log: - Fixed bug #60048 (sa_len a #define on IRIX)   patch by: china at thewrittenword dot com
 [2013-11-17 09:36 UTC] laruence@php.net
Automatic comment on behalf of felipe
Revision: http://git.php.net/?p=php-src.git;a=commit;h=cce94408e6f9cd18139b7fb82b588c8db89ab0e7
Log: - Fixed bug #60048 (sa_len a #define on IRIX)   patch by: china at thewrittenword dot com
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC