Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 78d3bb44 authored by Michal Marek's avatar Michal Marek
Browse files

kbuild: Fix <linux/version.h> for empty SUBLEVEL or PATCHLEVEL



expr treats all numbers as decimals, so prepending a zero is safe. Note
that the KERNEL_VERSION() macro still takes three arguments, 3.0 has to be
written as KERNEL_VERSION(3,0,0).

Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent cacd54ef
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1005,7 +1005,7 @@ endef

define filechk_version.h
	(echo \#define LINUX_VERSION_CODE $(shell                             \
	expr $(VERSION) \* 65536 + $(PATCHLEVEL) \* 256 + $(SUBLEVEL));     \
	expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 0$(SUBLEVEL));    \
	echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';)
endef