php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8468 sockets.c compile failure
Submitted: 2000-12-28 19:36 UTC Modified: 2001-01-03 13:09 UTC
From: jon at csh dot rit dot edu Assigned:
Status: Closed Package: Sockets related
PHP Version: 4.0.4 OS: Solaris 8
Private report: No CVE-ID: None
 [2000-12-28 19:36 UTC] jon at csh dot rit dot edu
Build environment:

Solaris 8
WorkShop Compilers 5.0 98/12/15 C 5.0
PHP 4.0.4

configure invocation:

./configure \
        --with-apxs=/web/servers/apache/sbin/apxs \
        --with-config-file-path=/web/servers/apache/conf \
        --with-db3=/usr/local \
        --enable-ftp \
        --with-imap=../imap-2000a \
        --with-mysql \
        --with-pgsql \
        --enable-sockets \
        --enable-sysvsem \
        --enable-sysvshm \
        --with-zlib \
        --enable-xml \
        --enable-yp

Compiler errors:

"sockets.c", line 1728: undefined struct/union member: msg_control
"sockets.c", line 1728: warning: improper pointer/integer combination: op "="
"sockets.c", line 1729: undefined struct/union member: msg_controllen
"sockets.c", line 1731: undefined struct/union member: msg_control
"sockets.c", line 1732: undefined struct/union member: msg_controllen
"sockets.c", line 1735: undefined struct/union member: msg_flags
"sockets.c", line 1741: undefined struct/union member: msg_control
"sockets.c", line 1750: warning: improper pointer/integer combination: arg #3
"sockets.c", line 1754: undefined struct/union member: msg_controllen
"sockets.c", line 1755: improper member use: msg_flags
"sockets.c", line 1787: undefined struct/union member: msg_control
"sockets.c", line 1787: warning: improper pointer/integer combination: op "="
"sockets.c", line 1788: undefined struct/union member: msg_controllen
"sockets.c", line 1790: undefined struct/union member: msg_control
"sockets.c", line 1791: undefined struct/union member: msg_controllen
"sockets.c", line 1794: undefined struct/union member: msg_flags
"sockets.c", line 1800: undefined struct/union member: msg_control
"sockets.c", line 1810: warning: improper pointer/integer combination: arg #3
"sockets.c", line 1812: undefined struct/union member: msg_controllen
"sockets.c", line 1814: improper member use: msg_flags
cc: acomp failed for sockets.c

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-03 13:09 UTC] jon@php.net
Fixed with this patch (committed to 4.0.5):

--- sockets.c.orig      Wed Jan  3 12:47:34 2001
+++ sockets.c   Wed Jan  3 12:55:43 2001
@@ -26,9 +26,14 @@
 
 /* This hopefully will fix some compile errors on other platforms --
  * the usage of msg_control/msg_controllen are X/Open Extended attributes,
- * or so it seems, by reading HP/UX 10.20 manual pages. */
+ * or so it seems, by reading HP/UX 10.20 manual pages.
+ *
+ * The second two defines are for Solaris 8 with the Sun WorkShop compiler.
+ */
 
 #define _XOPEN_SOURCE_EXTENDED
+#define _XPG4_2
+#define __EXTENSIONS__
 
 #include "ext/standard/info.h"
 #include "php_sockets.h"
@@ -64,6 +69,12 @@
 #else
 #define MSG_WAITALL 0x00000000
 #endif
+#endif
+
+/* Solaris 8 doesn't appear to define SUN_LEN in <sys/un.h> */
+#ifndef SUN_LEN
+#define SUN_LEN(su) \
+        (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
 #endif
 
 /* Use the read() wrapper, stopping at '\n', '\r', or '\0'. */
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Jun 19 01:01:28 2019 UTC