mirror of
https://github.com/dynup/kpatch
synced 2024-12-27 15:52:02 +00:00
72e260f50c
Fixes #189. Fixes #228.
14 lines
374 B
Diff
14 lines
374 B
Diff
Index: src/kernel/time/timekeeping.c
|
|
===================================================================
|
|
--- src.orig/kernel/time/timekeeping.c
|
|
+++ src/kernel/time/timekeeping.c
|
|
@@ -480,6 +480,8 @@ void do_gettimeofday(struct timeval *tv)
|
|
{
|
|
struct timespec now;
|
|
|
|
+ if (!tv)
|
|
+ return;
|
|
getnstimeofday(&now);
|
|
tv->tv_sec = now.tv_sec;
|
|
tv->tv_usec = now.tv_nsec/1000;
|