12345678910111213141516171819202122232425262728293031 |
- #include <sys/syscall.h>
- #include <time.h>
- #if defined(__NR_time) && !defined(__UCLIBC_USE_TIME64__)
- _syscall_noerr1(time_t, time, time_t *, t)
- #else
- # include <sys/time.h>
- time_t time(time_t * t)
- {
- time_t result;
- struct timeval tv;
-
- gettimeofday(&tv, NULL);
- result = (time_t) tv.tv_sec;
- if (t != NULL)
- *t = result;
- return result;
- }
- #endif
- libc_hidden_def(time)
|