compile error / System.c

Michael Thies mthies at
Tue Jul 3 23:52:18 PDT 2001

Johan Andersson wrote:
> System.c: In function `java_lang_System_initProperties':
> System.c:415: warning: implicit declaration of function `time'
> System.c:418: warning: implicit declaration of function `localtime'
> System.c:418: invalid type argument of `->'
> I find this very strange, since I have downloaded and compiled kaffe before
> on a redhat dist (6.2) before without any problems. The gcc version is
> egcs-2.91.66. I have tried with gcc version 2.96 as well.
> Configured kaffe with --prefix=/tmp/kaffe as my only config flag.
> Any suggestions, work arounds???

Hi Johan,

header file organization has been recently changed with many Linux
distributions. Although I have not compiled kaffe on Linux recently,
my guess is that System.c includes the header sys/time.h
In older Linux versions this used to have the side effect of bringing
in the full header time.h (note, no sys/ prefix). This is no longer

Try to change the include from sys/time.h to just time.h or add an
explicit include of time.h.

Hope, this helps.

More information about the kaffe mailing list