this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix clock_gettime monotonic (#230)

Prevents ssh from hanging. Now it asks for password then segfaults.

darlinghq/darling#303

+8 -1
+8 -1
src/kernel/libsyscall/wrappers/mach_boottime.c
··· 21 21 * @APPLE_LICENSE_HEADER_END@ 22 22 */ 23 23 #include <machine/cpu_capabilities.h> 24 + #include <time.h> 25 + #include "../../emulation/linux/base.h" 26 + #include "../../emulation/linux/linux-syscalls/linux.h" 24 27 25 28 uint64_t 26 29 mach_boottime_usec(void) 27 30 { 28 - return *(uint64_t*)_COMM_PAGE_BOOTTIME_USEC; 31 + struct timespec ts; 32 + LINUX_SYSCALL(__NR_clock_gettime, CLOCK_MONOTONIC, &ts); 33 + return ((ts.tv_sec*1000*1000*1000)+ts.tv_nsec)/1000; 34 + /* We don't have this working, so make Linux syscall */ 35 + /* return *(uint64_t*)_COMM_PAGE_BOOTTIME_USEC; */ 29 36 }