diff options
author | Michal Marek <mmarek@suse.cz> | 2011-05-30 07:37:20 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2011-06-09 17:05:54 -0400 |
commit | 78d3bb4483ba1b206dbaaf209219ed517b01f7da (patch) | |
tree | 9d4ca72627ad986231f7605d421e30addba02d3b /Makefile | |
parent | cacd54ef49b75cb31d78bb7b8dd900690aac7bdf (diff) |
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: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1005,7 +1005,7 @@ endef | |||
1005 | 1005 | ||
1006 | define filechk_version.h | 1006 | define filechk_version.h |
1007 | (echo \#define LINUX_VERSION_CODE $(shell \ | 1007 | (echo \#define LINUX_VERSION_CODE $(shell \ |
1008 | expr $(VERSION) \* 65536 + $(PATCHLEVEL) \* 256 + $(SUBLEVEL)); \ | 1008 | expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 0$(SUBLEVEL)); \ |
1009 | echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) | 1009 | echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) |
1010 | endef | 1010 | endef |
1011 | 1011 | ||