diff -Nru ndiswrapper-1.60/debian/changelog ndiswrapper-1.60/debian/changelog --- ndiswrapper-1.60/debian/changelog 2018-01-10 18:14:21.000000000 +0000 +++ ndiswrapper-1.60/debian/changelog 2019-05-09 21:40:40.000000000 +0000 @@ -1,3 +1,9 @@ +ndiswrapper (1.60-6ubuntu0.1) bionic; urgency=medium + + * Fix build for 5.0 (LP: #1813063) + + -- Connor Kuehl Thu, 09 May 2019 14:40:40 -0700 + ndiswrapper (1.60-6) unstable; urgency=medium [ Seth Forshee ] diff -Nru ndiswrapper-1.60/debian/control ndiswrapper-1.60/debian/control --- ndiswrapper-1.60/debian/control 2018-01-10 18:14:21.000000000 +0000 +++ ndiswrapper-1.60/debian/control 2019-05-09 21:40:40.000000000 +0000 @@ -1,7 +1,8 @@ Source: ndiswrapper Section: misc Priority: optional -Maintainer: Julian Andres Klode +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Julian Andres Klode Standards-Version: 4.1.1 Build-Depends: debhelper (>= 9), bzip2, dkms Vcs-Git: https://anonscm.debian.org/git/collab-maint/ndiswrapper.git diff -Nru ndiswrapper-1.60/debian/patches/0009-kernel-5.0-Replace-do_gettimeofday-with-ktime_get_re.patch ndiswrapper-1.60/debian/patches/0009-kernel-5.0-Replace-do_gettimeofday-with-ktime_get_re.patch --- ndiswrapper-1.60/debian/patches/0009-kernel-5.0-Replace-do_gettimeofday-with-ktime_get_re.patch 1970-01-01 00:00:00.000000000 +0000 +++ ndiswrapper-1.60/debian/patches/0009-kernel-5.0-Replace-do_gettimeofday-with-ktime_get_re.patch 2019-05-09 21:40:40.000000000 +0000 @@ -0,0 +1,48 @@ +From: Julian Andres Klode +Date: Fri, 25 Jan 2019 21:04:17 +0100 +Subject: kernel 5.0: Replace do_gettimeofday() with ktime_get_real() + +do_gettimeofday() was removed in kernel 5.0, a direct replacement +seems to be ktime_get_real() and friends. ktime_get_real() seems +to be a nice replacement, and even makes the code easier. + +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1813063 +--- + driver/ntoskernel.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/driver/ntoskernel.c b/driver/ntoskernel.c +index 156c688..a99490b 100644 +--- a/driver/ntoskernel.c ++++ b/driver/ntoskernel.c +@@ -2498,7 +2498,11 @@ struct worker_init_struct { + + int ntoskernel_init(void) + { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0) + struct timeval now; ++#else ++ ktime_t now; ++#endif + + spin_lock_init(&dispatcher_lock); + spin_lock_init(&ntoskernel_lock); +@@ -2518,11 +2522,18 @@ int ntoskernel_init(void) + INIT_WORK(&ntos_work, ntos_work_worker); + wrap_timer_slist.next = NULL; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0) + do_gettimeofday(&now); + wrap_ticks_to_boot = TICKS_1601_TO_1970; + wrap_ticks_to_boot += (u64)now.tv_sec * TICKSPERSEC; + wrap_ticks_to_boot += now.tv_usec * 10; + wrap_ticks_to_boot -= jiffies * TICKSPERJIFFY; ++#else ++ now = ktime_get_real(); ++ wrap_ticks_to_boot = TICKS_1601_TO_1970; ++ wrap_ticks_to_boot += ktime_to_us(now) * 10; ++ wrap_ticks_to_boot -= jiffies * TICKSPERJIFFY; ++#endif + TRACE2("%llu", wrap_ticks_to_boot); + + cpu_count = num_online_cpus(); diff -Nru ndiswrapper-1.60/debian/patches/series ndiswrapper-1.60/debian/patches/series --- ndiswrapper-1.60/debian/patches/series 2018-01-10 18:14:21.000000000 +0000 +++ ndiswrapper-1.60/debian/patches/series 2019-05-09 21:40:40.000000000 +0000 @@ -6,3 +6,4 @@ 0006-Build-fixes-for-Linux-4.11.patch 0007-Build-fixes-for-Linux-4.13.patch 0008-Build-fixes-for-Linux-4.15.patch +0009-kernel-5.0-Replace-do_gettimeofday-with-ktime_get_re.patch