RE: [PATCH] kbuild: Fix <linux/version.h> for empty SUBLEVEL or PATCHLEVEL again

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Masahiro Yamada
> Sent: 27 February 2021 14:20
> 
> Commit 9b82f13e7ef3 ("kbuild: clamp SUBLEVEL to 255") breaks the build
> if SUBLEVEL or PATCHLEVEL is empty.
> 
> Commit 78d3bb4483ba ("kbuild: Fix <linux/version.h> for empty SUBLEVEL
> or PATCHLEVEL") fixed the issue by prepending a zero.
> 
> This time, we cannot take the same approach because we have C code:
> 
>   #define LINUX_VERSION_PATCHLEVEL $(PATCHLEVEL)
>   #define LINUX_VERSION_SUBLEVEL $(SUBLEVEL)
> 
> Replace empty SUBLEVEL or PATCHLEVEL with a zero.

You could do:

#define LINUX_VERSION_PATCHLEVEL ($(PATCHLEVEL) + 0)

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux