2 * gettimeofday() for uClibc
4 * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
6 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
9 #include <sys/syscall.h>
17 #ifdef __VDSO_SUPPORT__
18 typedef int (*gettimeofday_func
)(struct timeval
* tv
, __timezone_ptr_t tz
);
21 int gettimeofday(struct timeval
* tv
, __timezone_ptr_t tz
) {
23 #ifdef __VDSO_SUPPORT__
24 if ( _dl__vdso_gettimeofday
!= 0 ){
25 gettimeofday_func func
= _dl__vdso_gettimeofday
;
26 return func( tv
, tz
);
29 _syscall2_body(int, gettimeofday
, struct timeval
*, tv
, __timezone_ptr_t
, tz
)
32 _syscall2_body(int, gettimeofday
, struct timeval
*, tv
, __timezone_ptr_t
, tz
)
37 libc_hidden_def(gettimeofday
)