I built a cross-compiler using binutils, gcc, and newlib
<http://sources.redhat.com/newlib/>, and then used it to compile the
lua program. The program fails to link because it refers to the
time(2) library call. This call is obsoleted by gettimeofday(2). Why
not use it instead of time(2)? Are there environments in which time
is available, but not gettimeofday?
You were right. My original bug report was misdirected. The lack of
time(2) being fixed by a newlib maintainer.
Jeff Johnston <[hidden email]> writes:
> Hmm, the libc/time/time.c code checks for the existence of
> HAVE_GETTIMEOFDAY flag and if not present, it doesn't compile the
> entire time function. The time function is ANSI and ifdefing it out
> is wrong. It also doesn't make sense to check for the syscall before
> calling it as it is one of the basic syscalls (stubbed in libnosys to
> return -1). I will fix this. In your case, you will see time() return
> -1 when libnosys provides the syscall.
> -- Jeff J.