php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8667 sockets
Submitted: 2001-01-12 02:25 UTC Modified: 2001-04-10 11:54 UTC
From: pairote dot p at cdg dot co dot th Assigned:
Status: Closed Package: Sockets related
PHP Version: 4.0.4 OS: Solaris 8
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pairote dot p at cdg dot co dot th
New email:
PHP Version: OS:

 

 [2001-01-12 02:25 UTC] pairote dot p at cdg dot co dot th
gcc  -I. -I/export/home/art/php-4.0.4pl1/ext/sockets -I/export/home/art/php-4.0.4pl1/main -I/export/home/art/php-4.0.4pl1 -I/export/home/art/apache_1.3.14/src/include -I/export/home/art/apache_1.3.14/src/os/unix -I/export/home/art/php-4.0.4pl1/Zend -I/export/home/art/c-client/include -I/export/home/art/sdk40/include -I/usr/local/mysql/include/mysql -I/export/home/art/php-4.0.4pl1/ext/xml/expat/xmltok -I/export/home/art/php-4.0.4pl1/ext/xml/expat/xmlparse -I/export/home/art/php-4.0.4pl1/TSRM  -D_POSIX_PTHREAD_SEMANTICS -DXML_BYTE_ORDER=21 -g -O2  -c sockets.c && touch sockets.lo
sockets.c: In function `php_if_recvmsg':
sockets.c:1728: structure has no member named `msg_control'
sockets.c:1729: structure has no member named `msg_controllen'
sockets.c:1731: structure has no member named `msg_control'
sockets.c:1732: structure has no member named `msg_controllen'
sockets.c:1735: structure has no member named `msg_flags'
sockets.c:1741: structure has no member named `msg_control'
sockets.c:1750: warning: passing arg 3 of `add_assoc_string' makes pointer from integer without a cast
sockets.c:1754: structure has no member named `msg_controllen'
sockets.c:1755: structure has no member named `msg_flags'
sockets.c:1787: structure has no member named `msg_control'
sockets.c:1788: structure has no member named `msg_controllen'
sockets.c:1790: structure has no member named `msg_control'
sockets.c:1791: structure has no member named `msg_controllen'
sockets.c:1794: structure has no member named `msg_flags'
sockets.c:1800: structure has no member named `msg_control'
sockets.c:1810: warning: passing arg 3 of `add_assoc_string' makes pointer from integer without a cast
sockets.c:1812: structure has no member named `msg_controllen'
sockets.c:1814: structure has no member named `msg_flags'
*** Error code 1
make: Fatal error: Command failed for target `sockets.lo'
Current working directory /export/home/art/php-4.0.4pl1/ext/sockets
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'
Current working directory /export/home/art/php-4.0.4pl1/ext/sockets
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'
Current working directory /export/home/art/php-4.0.4pl1/ext
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-12 02:31 UTC] jon@php.net
I fixed this compilation problem in the 4.0.5 development tree about a week ago.  See revision 1.27 of sockets.c (http://cvs.php.net/viewcvs.cgi/php4/ext/sockets/sockets.c.diff?r1=1.26&r2=1.27).
 [2001-01-12 10:51 UTC] cynic@php.net
user feedback:

Nope. I can reproduce this with latest CVS in Solaris 8.. BUT only
when using GCC. With the Sun CC it works fine.


So this bug report should be re-opened.
Here's what I get with latest CVS when using GCC 2.95.2:


safe_mode.c: In function `php_checkuid':
safe_mode.c:127: warning: passing arg 2 of `zend_hash_exists' discards
qualifiers from pointer target type
sockets.c:118: `php_if___xnet_listen' undeclared here (not in a function)
sockets.c:118: initializer element is not constant
sockets.c:118: (near initialization for `sockets_functions[10].handler')
sockets.c:139: `php_if___xnet_socket' undeclared here (not in a function)
sockets.c:139: initializer element is not constant
sockets.c:139: (near initialization for `sockets_functions[16].handler')
sockets.c:140: `php_if___xnet_connect' undeclared here (not in a function)
sockets.c:140: initializer element is not constant
sockets.c:140: (near initialization for `sockets_functions[17].handler')
sockets.c:142: `php_if___xnet_bind' undeclared here (not in a function)
sockets.c:142: initializer element is not constant
sockets.c:142: (near initialization for `sockets_functions[19].handler')
sockets.c:146: `php_if___xnet_sendto' undeclared here (not in a function)
sockets.c:146: initializer element is not constant
sockets.c:146: (near initialization for `sockets_functions[23].handler')
sockets.c:153: `php_if___xnet_recvmsg' undeclared here (not in a function)
sockets.c:153: initializer element is not constant
sockets.c:153: (near initialization for `sockets_functions[30].handler')
sockets.c:154: `php_if___xnet_sendmsg' undeclared here (not in a function)
sockets.c:154: initializer element is not constant
sockets.c:154: (near initialization for `sockets_functions[31].handler')
sockets.c:157: `php_if___xnet_getsockopt' undeclared here (not in a
function)
sockets.c:157: initializer element is not constant
sockets.c:157: (near initialization for `sockets_functions[34].handler')
sockets.c:159: `php_if___xnet_socketpair' undeclared here (not in a
function)
sockets.c:159: initializer element is not constant
sockets.c:159: (near initialization for `sockets_functions[36].handler')
make[3]: *** [sockets.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

 [2001-02-20 18:20 UTC] pairote dot p at cdg dot co dot th
Simple but ugly workaround for Solaris 7/8 is to define _KERNEL for sockets.h in ext/sockets/sockets.c in PHP.

ext/sockets/socket.c:

#define _KERNEL
#include <sys/socket.h>
#undef _KERNEL

marc.butler@voyanttech.com
kevin.mercado@voyanttech.com
 [2001-03-04 12:30 UTC] cynic@php.net
From: Ralph Mitchell <rmitchell@sabre.com>
To: cynic@php.net
Subject: PHP-4.0.4pl1 bug #8667

I got the exact same result as you mention in bug #8667, on Solaris 6
with gcc 2.95.2.  I was compiling the latest sockets.c, pulled today
from CVS, with this id string:

/* $Id: sockets.c,v 1.32 2001/02/26 06:07:16 andi Exp $ */

Believe it or not, moving:

    #include "php_sockets.h"     (line 39)

down to *below* the block of system includes (i.e. after the include for
<sys/uio.h>, line 55) fixed the problem.  Guess php_sockets.h depends on
some system stuff being defined, probably from <sys/socket.h>.

Maybe someone else already spotted this - I may have missed it when I
checked the bug list.

 [2001-04-10 11:54 UTC] jason@php.net
Fixed In CVS: See comment on ( sockets.c,v 1.34 )

-Jason
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC