mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
- Fixed bug #62025 (__ss_family was changed on AIX 5.3)
This commit is contained in:
commit
f3615bc6f7
2 changed files with 18 additions and 0 deletions
|
@ -27,6 +27,21 @@ if test "$PHP_SOCKETS" != "no"; then
|
|||
[AC_DEFINE(MISSING_MSGHDR_MSGFLAGS, 1, [ ])]
|
||||
)
|
||||
AC_DEFINE([HAVE_SOCKETS], 1, [ ])
|
||||
|
||||
dnl Check for fied ss_family in sockaddr_storage (missing in AIX until 5.3)
|
||||
AC_CACHE_CHECK([for field ss_family in struct sockaddr_storage], ac_cv_ss_family,
|
||||
[
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
], [struct sockaddr_storage sa_store; sa_store.ss_family = AF_INET6;],
|
||||
ac_cv_ss_family=yes, ac_cv_ss_family=no)
|
||||
])
|
||||
|
||||
if test "$ac_cv_ss_family" = yes; then
|
||||
AC_DEFINE(HAVE_SA_SS_FAMILY,1,[Whether you have sockaddr_storage.ss_family])
|
||||
fi
|
||||
|
||||
PHP_NEW_EXTENSION([sockets], [sockets.c multicast.c], [$ext_shared])
|
||||
PHP_INSTALL_HEADERS([ext/sockets/], [php_sockets.h])
|
||||
|
|
|
@ -77,6 +77,9 @@
|
|||
# define IS_INVALID_SOCKET(a) (a->bsd_socket < 0)
|
||||
# define set_errno(a) (errno = a)
|
||||
# include "php_sockets.h"
|
||||
# if defined(AIX) && !defined(HAVE_SA_SS_FAMILY)
|
||||
# define ss_family __ss_family
|
||||
# endif
|
||||
# if HAVE_IF_NAMETOINDEX
|
||||
# include <net/if.h>
|
||||
# endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue