mescc: Mes C Library: time.c: Use #if defined.

This helps resurrect the mes-0.19-based bootstrap.

* lib/linux/time.c: Use #if defined () instead of plain #if for possibly
undefined macros.
This commit is contained in:
Jan (janneke) Nieuwenhuizen 2020-12-23 16:06:15 +01:00
parent 5bb568e455
commit 7ab9cfe864
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273

View file

@ -26,7 +26,7 @@
/* Linux' SYS_time syscall is a compatibility shim for SYS_gettimeofday. /* Linux' SYS_time syscall is a compatibility shim for SYS_gettimeofday.
Therefore, prefer SYS_gettimeofday. */ Therefore, prefer SYS_gettimeofday. */
#if SYS_gettimeofday #if defined (SYS_gettimeofday)
#include <sys/time.h> #include <sys/time.h>
@ -42,7 +42,7 @@ time (time_t * result)
return tv.tv_sec; return tv.tv_sec;
} }
#elif SYS_time #elif defined (SYS_time)
time_t time_t
time (time_t * result) time (time_t * result)