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:
Peter Collingbourne 2013-10-21 18:11:57 +00:00
parent 4ed49b5301
commit b745eec4e4
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}