This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix libjava build failure on Darwin


I'm currently seeing a build failure on mainline using "make bootstrap" on
powerpc-apple-darwin7.9.0.  The problem is that whilst building
java/lang/natConcreteProcess.cc we error out in the system header file
<sys/resource.h> with the error messages:
/usr/include/sys/resource.h:81: error: field `ru_utime' has incomplete type
/usr/include/sys/resource.h:82: error: field `ru_stime' has incomplete type

The problem is that "struct timeval" hasn't yet been defined.  The fix
that works for me is to #include <sys/time.h> immediately prior to the
inclusion of <sys/resource.h>.

The dependency on <sys/resource.h> is a relatively recent change,
introduced by David Daney's fix for PR libgcj/31228, and presumably most
platforms (perhaps even later versions of Darwin) allow the direct
inclusion of this header without this problematic dependency.

Tested on powerpc-apple-darwin7.9.0 where a "make bootstrap" gets past the
location of the current failure.  Ok for mainline?


2007-06-16  Roger Sayle  <roger@eyesopen.com>

        * java/lang/natPosixProcess.cc: Include <sys/time.h> before
        <sys/resource.h> to restore bootstrap on powerpc-apple-darwin7.9.0.


Roger
--

Attachment: patchj.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]