diff options
author | 2019-01-22 11:17:13 +0000 | |
---|---|---|
committer | 2019-01-22 13:56:57 +0000 | |
commit | c181b3adbb1cf2e1222fb602420a914f2a9e35dd (patch) | |
tree | d949145b34d9b1fc80dc55cb109e7e2519ae4b49 /debian/rules | |
parent | 11730cb6cac430f4846ee5ba6f9e69aeb8f53a5c (diff) |
binary module build: use kernel headers from highest version
Instead of uname -a, which might return a kernel version for which
there are no headers installed (eg: chroot build), use the highest
version of kernel headers actually available
Change-Id: I8f188e89c71a37e5da828bb79df84b676a771bab
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/debian/rules b/debian/rules index 5899dd09..2d69b828 100755 --- a/debian/rules +++ b/debian/rules @@ -59,7 +59,7 @@ else ifneq (,$(filter ksrc=%,$(DEB_BUILD_OPTIONS))) KSRC := $(patsubst ksrc=%,%,$(filter ksrc=%,$(DEB_BUILD_OPTIONS))) else - KSRC := /lib/modules/$(shell uname -r)/build + KSRC := /lib/modules/$(shell LIST=$$(ls /lib/modules/); for dir in $$LIST; do test -d /lib/modules/$$dir/build && echo $$dir; done | sort -V | tail -n1)/build endif KVERS := $(shell perl debian/kernel-version $(KSRC)) |