|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1998-05-30 17:39 UTC] rasmus
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 07:00:01 2025 UTC |
I just installed FreeBSD 2.2.6 - someting I pretty new to (been using mostly Linux before). When compiling PHP, I got a failure on the file mysql.c due to what appears to be a fudged configuration or pre-processor directive. My configuration: ./configure --with-apache=/usr/local/httpd --with-gd=no --with-pgsql --enable-debug=no --enable-track-vars=yes (Note that I'm _not_ configuring mysql) For some reason the HAVE_SYS_TYPES_H macro is not defined - even though I definitely have sys/types.h on my system. The simple fix was to change #if HAVE_SYS_TYPES_H #include <sys/types.h> #endif #include <netdb.h> #include <netinet/in.h> #endif to #if HAVE_SYS_TYPES_H #include <sys/types.h> #endif #include <sys/types.h> #include <netdb.h> #include <netinet/in.h> #endif I'm not sure what the "real" fix is. I could find no other sources that relied on HAVE_SYS_TYPES_H, so I wonder if it's even necessary. Here's the make error: gcc -O2 -fpic -I. -I. -I/usr/local/httpd/src -I/usr/local/pgsql/include -c functions/mysql.c In file included from functions/mysql.c:58: /usr/include/netinet/in.h:212: parse error before `u_long' /usr/include/netinet/in.h:212: warning: no semicolon at end of struct or union /usr/include/netinet/in.h:263: parse error before `u_char' /usr/include/netinet/in.h:263: warning: no semicolon at end of struct or union /usr/include/netinet/in.h:264: warning: data definition has no type or storage class /usr/include/netinet/in.h:265: parse error before `sin_port' /usr/include/netinet/in.h:265: warning: data definition has no type or storage class /usr/include/netinet/in.h:268: parse error before `}' /usr/include/netinet/in.h:278: field `ip_dst' has incomplete type /usr/include/netinet/in.h:325: field `imr_multiaddr' has incomplete type /usr/include/netinet/in.h:326: field `imr_interface' has incomplete type In file included from /usr/local/httpd/src/conf.h:580, from /usr/local/httpd/src/httpd.h:59, from php.h:182, from functions/mysql.c:61: /usr/include/arpa/inet.h:71: warning: parameter has incomplete type /usr/include/arpa/inet.h:74: warning: parameter has incomplete type /usr/include/arpa/inet.h:78: warning: parameter has incomplete type In file included from php.h:182, from functions/mysql.c:61: /usr/local/httpd/src/httpd.h:571: field `local_addr' has incomplete type /usr/local/httpd/src/httpd.h:572: field `remote_addr' has incomplete type /usr/local/httpd/src/httpd.h:603: field `host_addr' has incomplete type /usr/local/httpd/src/httpd.h:659: field `local_addr' has incomplete type /usr/include/netinet/in.h:266: storage size of `sin_addr' isn't known *** Error code 1 Stop. Although at first glance it may appear related to apache - it's not. It's simply a missing header file. -Brian Schaffner-