kpatch/test/integration/gcc-constprop.patch
2014-06-03 11:26:03 -05:00

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;