Explorar o código

Use __gettimeofday

Peter S. Mazinger %!s(int64=20) %!d(string=hai) anos
pai
achega
0a8a65e0a0

+ 2 - 0
libc/sysdeps/linux/common/clock_gettime.c

@@ -20,6 +20,8 @@
  *
  */
 
+#define gettimeofday __gettimeofday
+
 #define _GNU_SOURCE
 #include "syscalls.h"
 #include <time.h>

+ 2 - 0
libc/sysdeps/linux/common/dl-osinfo.h

@@ -7,6 +7,8 @@
 #ifndef _DL_OSINFO_H
 #define _DL_OSINFO_H 1
 
+#define gettimeofday __gettimeofday
+
 #include <features.h>
 
 #ifdef __UCLIBC_HAS_SSP__

+ 0 - 1
libc/sysdeps/linux/common/gettimeofday.c

@@ -9,7 +9,6 @@
 
 #include "syscalls.h"
 #include <sys/time.h>
-#undef gettimeofday
 #define __NR___gettimeofday __NR_gettimeofday
 attribute_hidden _syscall2(int, __gettimeofday, struct timeval *, tv, struct timezone *, tz);
 strong_alias(__gettimeofday,gettimeofday)

+ 2 - 0
libc/sysdeps/linux/common/time.c

@@ -7,6 +7,8 @@
  * GNU Library General Public License (LGPL) version 2 or later.
  */
 
+#define gettimeofday __gettimeofday
+
 #include "syscalls.h"
 #include <time.h>
 #include <sys/time.h>

+ 1 - 0
libc/sysdeps/linux/common/utime.c

@@ -8,6 +8,7 @@
  */
 
 #define utimes __utimes
+#define gettimeofday __gettimeofday
 
 #include "syscalls.h"
 #include <utime.h>