X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Fplatform.h;h=6b3b3f78e582a6ccff54afdbe0857a15674e651c;hb=e2e56c7c4129de7d20df42e8239fd304c81ef29b;hp=ea2983d30f859b00bd12125311c0cc769455084f;hpb=f8855139402a8752b9f9f5425cebe23e88e94c2a;p=oweals%2Fbusybox.git diff --git a/include/platform.h b/include/platform.h index ea2983d30..6b3b3f78e 100644 --- a/include/platform.h +++ b/include/platform.h @@ -32,17 +32,6 @@ # endif #endif -#if 0 -/* Attribute __malloc__ on functions was valid as of gcc 2.96. */ -#ifndef ATTRIBUTE_MALLOC -# if __GNUC_PREREQ (2,96) -# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -# else -# define ATTRIBUTE_MALLOC -# endif /* GNUC >= 2.96 */ -#endif /* ATTRIBUTE_MALLOC */ -#endif - #ifndef ATTRIBUTE_UNUSED # define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #endif /* ATTRIBUTE_UNUSED */ @@ -102,6 +91,13 @@ # include #endif +/*----- Kernel versioning ------------------------------------*/ +#ifdef __linux__ +#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) +#else +#error implement KERNEL_VERSION for your platform +#endif + /* ---- miscellaneous --------------------------------------- */ /* NLS stuff */ /* THIS SHOULD BE CLEANED OUT OF THE TREE ENTIRELY */