Bug #69260 [Com]: NetBSD TCP_INFO is similar to FreeBSD

From: Date: Thu, 19 Mar 2015 08:45:46 +0000
Subject: Bug #69260 [Com]: NetBSD TCP_INFO is similar to FreeBSD
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-191466@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69260&edit=1

 ID:                 69260
 Comment by:         he at NetBSD dot org
 Reported by:        he at NetBSD dot org
 Summary:            NetBSD TCP_INFO is similar to FreeBSD
 Status:             Open
 Type:               Bug
 Package:            Compile Failure
 Operating System:   NetBSD
 PHP Version:        5.6.6
 Block user comment: N
 Private report:     N

 New Comment:

I don't think a version check is required.
There's already a check surrounding this code
which is dependent on TCP_INFO being defined,
which should be a sufficient check?


Previous Comments:
------------------------------------------------------------------------
[2015-03-19 08:40:44] laruence@php.net

should also add a version checking of NetBSD check as well?

------------------------------------------------------------------------
[2015-03-19 08:24:29] he at NetBSD dot org

Description:
------------
NetBSD has recently inherited TCP_INFO from FreeBSD,
so the use needs to be similar to FreeBSD, not Linux.

This fix needs to be applied to php 5.5.22 as well.


Expected result:
----------------
Build should succeed on NetBSD 7 (either 7.0_BETA or 7.99.5 aka. -current)


Actual result:
--------------
/scratch/www/php-fpm/work/php-5.6.6/sapi/fpm/fpm/fpm_sockets.c:447:11: error: no member named
'tcpi_sacked' in 'struct tcp_info'; did you mean '__tcpi_sacked'?
        if (info.tcpi_sacked == 0) {
                 ^~~~~~~~~~~
                 __tcpi_sacked
/usr/include/netinet/tcp.h:168:11: note: '__tcpi_sacked' declared here
        uint32_t        __tcpi_sacked;
                        ^
/scratch/www/php-fpm/work/php-5.6.6/sapi/fpm/fpm/fpm_sockets.c:452:18: error: no member named
'tcpi_unacked' in 'struct tcp_info'; did you mean '__tcpi_unacked'?
                *cur_lq = info.tcpi_unacked;
                               ^~~~~~~~~~~~
                               __tcpi_unacked
/usr/include/netinet/tcp.h:167:11: note: '__tcpi_unacked' declared here
        uint32_t        __tcpi_unacked;
                        ^
/scratch/www/php-fpm/work/php-5.6.6/sapi/fpm/fpm/fpm_sockets.c:456:18: error: no member named
'tcpi_sacked' in 'struct tcp_info'; did you mean '__tcpi_sacked'?
                *max_lq = info.tcpi_sacked;
                               ^~~~~~~~~~~
                               __tcpi_sacked
/usr/include/netinet/tcp.h:168:11: note: '__tcpi_sacked' declared here
        uint32_t        __tcpi_sacked;
                        ^
3 errors generated.
*** [sapi/fpm/fpm/fpm_sockets.lo] Error code 1



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



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


Thread (6 messages)

« previous php.bugs (#191466) next »