summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-04-30 22:00:11 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2020-04-30 22:08:29 -0600
commite21f8816ec23e6a01529a05215a45d713d5a55b4 (patch)
tree7a698890a281ee6e22bd4580ea7d0d4d401b4da8
parentversion: bump (diff)
downloadwireguard-linux-compat-e21f8816ec23e6a01529a05215a45d713d5a55b4.tar.xz
wireguard-linux-compat-e21f8816ec23e6a01529a05215a45d713d5a55b4.zip
compat: timeconst.h is a generated artifact
Before we were trying to check for timeconst.h by looking in the kernel source directory. This isn't quite correct on configurations in which the object directory is separate from the kernel source directory, for example when using O="elsewhere" as a make option when building the kernel. The correct fix is to use $(CURDIR), which should point to where we want. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--src/compat/Kbuild.include2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compat/Kbuild.include b/src/compat/Kbuild.include
index 53a8bde..addc7c6 100644
--- a/src/compat/Kbuild.include
+++ b/src/compat/Kbuild.include
@@ -52,7 +52,7 @@ ccflags-y += -DCOMPAT_CANNOT_USE_DEV_CNF
endif
ifdef CONFIG_HZ
-ifeq ($(wildcard $(srctree)/include/generated/timeconst.h),)
+ifeq ($(wildcard $(CURDIR)/include/generated/timeconst.h),)
HZ_IFDEF := $(shell echo 'define gcd(a,b){auto t;while(b){t=b;b=a%b;a=t;};return a;};hz=$(CONFIG_HZ);cd=gcd(hz,1000000);print "-DHZ_TO_USEC_NUM=",1000000/cd," -DHZ_TO_USEC_DEN=",hz/cd;halt;' | bc -q)
ifeq ($(HZ_IFDEF),)
$(error bc(1) is required for building)