summaryrefslogtreecommitdiff
path: root/network/ndiswrapper-kernel/patches/0001-Use-KERNELRELEASE-as-target-kernel-version.patch
blob: 63031be58ea9bfea57398d20f388f82134954434 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From f92374a3e3b1952f6ee882872b7b74686ccfc940 Mon Sep 17 00:00:00 2001
From: Ben Hutchings <ben@decadent.org.uk>
Date: Tue, 8 Oct 2013 20:47:16 +0300
Subject: [PATCH 1/5] Use $KERNELRELEASE as target kernel version

We must not assume that the running kernel version is the target
version!  DKMS and later Kbuild set $KERNELRELEASE to be the target
kernel version.

---

Taken from git://anonscm.debian.org/collab-maint/ndiswrapper.git
debian/patches/ndiswrapper-use-KERNELRELEASE.patch

Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
---
 driver/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/driver/Makefile b/driver/Makefile
index fd5cebf..37dda9c 100644
--- a/driver/Makefile
+++ b/driver/Makefile
@@ -12,7 +12,11 @@ DISTFILES = \
 # By default, we try to compile the modules for the currently running
 # kernel.  But it's the first approximation, as we will re-read the
 # version from the kernel sources.
+ifeq (,$(KERNELRELEASE))
 KVERS_UNAME ?= $(shell uname -r)
+else
+KVERS_UNAME ?= $(KERNELRELEASE)
+endif
 
 # KBUILD is the path to the Linux kernel build tree.  It is usually the
 # same as the kernel source tree, except when the kernel was compiled in
-- 
1.8.4