From ec0411a367bdf9292e72f9475e99b3487e08aa8f Mon Sep 17 00:00:00 2001 From: kimocoder Date: Fri, 1 Feb 2019 23:27:55 +0100 Subject: [PATCH] added kernel v4.20 support --- Makefile | 1 + os_dep/linux/ioctl_cfg80211.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Makefile b/Makefile index e0a9aff..aedb285 100755 --- a/Makefile +++ b/Makefile @@ -14,6 +14,7 @@ EXTRA_CFLAGS += -Wno-unused-parameter EXTRA_CFLAGS += -Wno-unused-function EXTRA_CFLAGS += -Wno-unused #EXTRA_CFLAGS += -Wno-uninitialized +EXTRA_CFLAGS += -Wno-vla GCC_VER_49 := $(shell echo `$(CC) -dumpversion | cut -f1-2 -d.` \>= 4.9 | bc ) ifeq ($(GCC_VER_49),1) diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 209a808..31e920d 100755 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -688,7 +688,11 @@ static u64 rtw_get_systime_us(void) { #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)) struct timespec ts; +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)) + getboottime(&ts); +#else get_monotonic_boottime(&ts); +#endif return ((u64)ts.tv_sec * 1000000) + ts.tv_nsec / 1000; #else struct timeval tv;