forked from OSchip/llvm-project
Use internal_memset to initialize this variable.
Otherwise, the compiler may use memset in non-optimized builds, which is forbidden in the nolibc part of the runtime. llvm-svn: 193098
This commit is contained in:
parent
4ed49b5301
commit
b745eec4e4
|
@ -218,7 +218,8 @@ uptr GetTid() {
|
|||
}
|
||||
|
||||
u64 NanoTime() {
|
||||
kernel_timeval tv = {};
|
||||
kernel_timeval tv;
|
||||
internal_memset(&tv, 0, sizeof(tv));
|
||||
internal_syscall(__NR_gettimeofday, &tv, 0);
|
||||
return (u64)tv.tv_sec * 1000*1000*1000 + tv.tv_usec * 1000;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue