This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PATCH: Use __gettimeofday instead of gettimeofday
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 24 Jun 2011 07:13:59 -0700
- Subject: PATCH: Use __gettimeofday instead of gettimeofday
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
We should use __gettimeofday instead of gettimeofday for libc internal
use.
H.J.
---
2011-06-23 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Use
__gettimeofday instead of gettimeofday.
diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c
index b74774f..b9bae3d 100644
--- a/sysdeps/unix/sysv/linux/getsysstats.c
+++ b/sysdeps/unix/sysv/linux/getsysstats.c
@@ -147,7 +147,7 @@ __get_nprocs ()
INTERNAL_VSYSCALL (clock_gettime, err, 2, CLOCK_REALTIME, &ts);
#else
struct timeval ts;
- gettimeofday (&ts, NULL);
+ __gettimeofday (&ts, NULL);
#endif
time_t prev = timestamp;
atomic_read_barrier ();