platform: use KERNEL_VERSION to simplify uClibc version checking

This makes reading the logic (as well as adding new code) a lot simpler,
and fixes one or two cases that were broken due to incorrect sub-version
tests.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Mike Frysinger
2013-03-12 11:13:22 -04:00
parent bca5c556c4
commit 445e7543e8
3 changed files with 13 additions and 16 deletions

View File

@@ -64,12 +64,10 @@
/* This is a NOEXEC applet. Be very careful! */
#if !ENABLE_USE_BB_PWD_GRP
#if defined(__UCLIBC_MAJOR__) && (__UCLIBC_MAJOR__ == 0)
#if (__UCLIBC_MINOR__ < 9) || (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ < 30)
#if defined(__UCLIBC__) && UCLIBC_VERSION < KERNEL_VERSION(0, 9, 30)
#error "Sorry, you need at least uClibc version 0.9.30 for id applet to build"
#endif
#endif
#endif
enum {
PRINT_REAL = (1 << 0),