1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-09-20 05:00:36 +00:00

Add kernel v4.20 support and minor compiler warning turned off

This commit is contained in:
kimocoder 2018-11-14 23:39:13 +01:00
parent e972ae8162
commit 0a4042afbd
2 changed files with 6 additions and 0 deletions

View File

@ -26,6 +26,8 @@ ifeq ($(GCC_VER_49),1)
EXTRA_CFLAGS += -Wno-date-time -Wno-error=date-time # Fix compile error && warning on gcc 4.9 and later EXTRA_CFLAGS += -Wno-date-time -Wno-error=date-time # Fix compile error && warning on gcc 4.9 and later
endif endif
EXTRA_CFLAGS += -Wno-vla
EXTRA_CFLAGS += -I$(src)/include EXTRA_CFLAGS += -I$(src)/include
EXTRA_LDFLAGS += --strip-debug EXTRA_LDFLAGS += --strip-debug

View File

@ -692,7 +692,11 @@ static u64 rtw_get_systime_us(void)
return do_div(ts, 1000); return do_div(ts, 1000);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)) #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
struct timespec ts; struct timespec ts;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0))
getboottime(&ts);
#else
get_monotonic_boottime(&ts); get_monotonic_boottime(&ts);
#endif
return ((u64)ts.tv_sec * 1000000) + ts.tv_nsec / 1000; return ((u64)ts.tv_sec * 1000000) + ts.tv_nsec / 1000;
#else #else
struct timeval tv; struct timeval tv;