Hi guys
I've run into problems when I compile on solaris 2.7 and I don't exactly know
where to patch this. The problem seems to be assumptions made by APR:
% pwd
[...]/subversion/subversion/libsvn_wc
% make
/bin/sh ../../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I.
-I../.. -I../../subversion/include -I../../apr/include -I../../expat-lite
-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -I/usr/local/BerkeleyDB.3.1/include
-D_POSIX_SOURCE=1 -Wmissing-prototypes -Wstrict-prototypes
-Wmissing-declarations -Wpointer-arith -Wwrite-strings -Wshadow
-Wredundant-decls -DSVN_DEBUG -DAP_DEBUG -g -Wall -c get_editor.c
In file included from ../../apr/include/apr_thread_proc.h:65,
from get_editor.c:26:
/usr/include/sys/resource.h:144: field `ru_utime' has incomplete type
/usr/include/sys/resource.h:145: field `ru_stime' has incomplete type
make: *** [get_editor.lo] Error 1
The reason for this is the -D_POSIX_SOURCE=1 line to the compiler combined
with the #include-sequence in ../../apr/include/apr_thread_proc.h
(line 63-66 looks like:)
#if APR_HAVE_STRUCT_RLIMIT
#include <sys/time.h>
#include <sys/resource.h>
#endif
... the struct rusage that is defined on line 143+ in sys/resource.h
requires the 'struct timeval' but when _POSIX_SOURCE is defined, sys/time.h
does not properly define that struct. Removing that particular -D from the
command line makes the compile successful, but I wouldn't say that is the
correct solution.
So, I just put this here for public exposure and I trust someone will help
out! ;-)
--
Daniel Stenberg - http://daniel.haxx.se - +46-705-44 31 77
ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
Received on Sat Oct 21 14:36:21 2006