Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
compat: don't backport ktime_get_coarse_boottime_ns to kernel-4.18.0-394
  • Loading branch information
darkranger-red committed Jul 22, 2022
1 parent 3d3c92b commit 8cfcb57
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/compat/Kbuild.include
Expand Up @@ -109,3 +109,5 @@ endif
ifneq ($(shell grep -s -F "\#define LINUX_PACKAGE_ID \" Debian " "$(CURDIR)/include/generated/package.h"),)
ccflags-y += -DISDEBIAN
endif

ccflags-y += -DRHEL_KERNEL_RELEASE=$(shell grep -s -E '^\#define RHEL_RELEASE[[:space:]]+"[[:digit:]]+' "$(CURDIR)/include/generated/uapi/linux/version.h"| sed 's/\./ /g'| sed 's/"/ /g' | awk '{print $$3} END {if (!NR) print "0"}')
5 changes: 4 additions & 1 deletion src/compat/compat.h
Expand Up @@ -16,6 +16,9 @@
#define ISRHEL7
#elif RHEL_MAJOR == 8
#define ISRHEL8
#if RHEL_MINOR >= 7 && RHEL_KERNEL_RELEASE >= 394
#define IS_NEWER_RHEL8
#endif
#endif
#endif
#ifdef UTS_UBUNTU_RELEASE_ABI
Expand Down Expand Up @@ -387,7 +390,7 @@ static inline int get_random_bytes_wait(void *buf, int nbytes)
#define system_power_efficient_wq system_unbound_wq
#endif

#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 0) && !defined(IS_NEWER_RHEL8)
#include <linux/ktime.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
#include <linux/hrtimer.h>
Expand Down

0 comments on commit 8cfcb57

Please sign in to comment.