[PATCH] Fix time on ia64 and alpha
Jakub Jelinek
jakub@redhat.com
Tue Dec 20 14:47:00 GMT 2005
Hi!
IA-64 and Alpha don't define __NR_time and need to use the generic
implementation. SPARC64 needs to use it too, but defines __NR_time
(because it is provided for 32-bit code), so
sysdeps/unix/sysv/linux/sparc/sparc64/time.c should be kept as is.
2005-12-20 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/time.c: If __NR_time is not defined,
use sysdeps/unix/time.c implementation.
--- libc/sysdeps/unix/sysv/linux/time.c.jj 2005-12-20 08:49:43.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/time.c 2005-12-20 12:49:42.000000000 +0100
@@ -21,6 +21,7 @@
#include <sysdep.h>
+#ifdef __NR_time
time_t
time (time_t *t)
@@ -33,3 +34,9 @@ time (time_t *t)
return res;
}
libc_hidden_def (time)
+
+#else
+
+#include <sysdeps/unix/time.c>
+
+#endif
Jakub
More information about the Libc-hacker
mailing list