php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10561 sockets.c uses `SUN_LEN' unconditionally - undefined on Solaris
Submitted: 2001-04-30 11:04 UTC Modified: 2001-05-03 02:03 UTC
From: Rob dot McMahon at warwick dot ac dot uk Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0.4pl1 OS: Solaris 7
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: Rob dot McMahon at warwick dot ac dot uk
New email:
PHP Version: OS:

 

 [2001-04-30 11:04 UTC] Rob dot McMahon at warwick dot ac dot uk
Configured with

nv 'CC=cc -mt' CFLAGS=-O CPPFLAGS='-D_XPG4_2
-D__EXTENSIONS__' ./configure
--with-apxs=/usr/local/apache_1.3.19/bin/apxs
--with-mysql=/usr/local/mysql
--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-imap=/usr/local/src/pine4.30/imap
--with-java=/usr/java --with-mcal
--with-unixODBC=/usr/local/unixODBC
--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 ----
  #endif
  #endif

+ /* ... 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. */

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-01 20:31 UTC] sniper@php.net
Have you tried 4.0.5 as I think this is fixed in it.
Also, you don't  need to set those CPPFLAGS anymore.

--Jani

 [2001-05-03 02:03 UTC] sniper@php.net
User said this is fixed.

--Jani

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 10:01:28 2025 UTC