diff --git a/pkgs/os-specific/linux/spl/default.nix b/pkgs/os-specific/linux/spl/default.nix index 0648be4e41a..8f4a7491427 100644 --- a/pkgs/os-specific/linux/spl/default.nix +++ b/pkgs/os-specific/linux/spl/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "0id0m3sfpkz8w7b2pc51px8kvz8xnaf8msps57ddarxidmxvb45g"; }; - patches = [ ./install_prefix.patch ./const.patch ]; + patches = [ ./install_prefix.patch ./const.patch ./time.patch ]; buildInputs = [ perl autoconf automake libtool ]; diff --git a/pkgs/os-specific/linux/spl/time.patch b/pkgs/os-specific/linux/spl/time.patch new file mode 100644 index 00000000000..6b1e23bc05e --- /dev/null +++ b/pkgs/os-specific/linux/spl/time.patch @@ -0,0 +1,18 @@ +diff --git a/module/spl/spl-time.c b/module/spl/spl-time.c +index 0ed49cc..b0fad4f 100644 +--- a/module/spl/spl-time.c ++++ b/module/spl/spl-time.c +@@ -40,12 +40,7 @@ extern unsigned long long monotonic_clock(void); + void + __gethrestime(timestruc_t *ts) + { +- struct timespec tspec; +- +- getnstimeofday(&tspec); +- +- ts->tv_sec = tspec.tv_sec; +- ts->tv_nsec = tspec.tv_nsec; ++ *ts = current_kernel_time(); + } + EXPORT_SYMBOL(__gethrestime); +