From:             [EMAIL PROTECTED]
Operating system: Solaris 7
PHP version:      4.0.4pl1
PHP Bug Type:     Compile Failure
Bug description:  sockets.c uses `SUN_LEN' unconditionally - undefined on Solaris

Configured with

nv 'CC=cc -mt' CFLAGS=-O CPPFLAGS='-D_XPG4_2
-D__EXTENSIONS__' ./configure
--with-ldap=/usr/local/openldap --with-xml --enable-yp
--enable-safe-mode --with-gd --with-jpeg-dir=/usr/local
--with-pdflib --with-zlib --with-tiff-dir=/usr/local
--with-openssl=/usr/local/openssl --enable-bcmath --with-bz2
--enable-calendar --enable-dbase --with-gdbm=/usr/local/gnu
--with-ndbm --enable-ctype --with-db3=/usr/local/BerkeleyDB
--with-dom --enable-exif --with-fdftk --enable-filepro
--enable-ftp --enable-gd-imgstrttf --with-gd --with-gmp
--with-hyperwave --with-imap-ssl
--with-java=/usr/java --with-mcal
--with-readline=/usr/local/gnu --with-mm --enable-trans-sid
--enable-shmop --enable-sockets --with-regex=php
--enable-sysvsem --enable-sysvshm --enable-wddx --with-zlib
--enable-versioning --enable-track-vars --without-fdftk
--without-mcal --with-xpm-dir=/usr/local/X11

Can be fixed with (I suspect this is going to get mangled in
the post).

diff -c -r1.1 sockets.c
*** sockets.c   2001/04/19 10:04:11     1.1
--- sockets.c   2001/04/19 16:17:37
*** 66,71 ****
--- 66,77 ----

+ /* ... or this */
+ #ifndef       SUN_LEN
+ #define       SUN_LEN(sunp)   ((size_t)((struct
sockaddr_un *)0)->sun_path \
+                        + strlen((sunp)->sun_path))
+ #endif
  /* Use the read() wrapper, stopping at '\n', '\r', or '\0'. */
  #define PHP_NORMAL_READ 0x0001
  /* Use the read() wrapper, but read until the entire
buffer is filled. */

Edit Bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to