From: Ruediger Meier Date: Tue, 23 Jan 2018 15:59:28 +0000 (+0100) Subject: rfkill: provide RFKILL_TYPE_FM if undefined X-Git-Tag: v2.32-rc1~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40defd0c4d6a2a3f4b40842c3b8798755a5c1ef1;p=thirdparty%2Futil-linux.git rfkill: provide RFKILL_TYPE_FM if undefined As discussed last year it's nice to be compatible to 2.6.32 https://www.spinics.net/lists/util-linux-ng/msg13963.html BTW also re-define NUM_RFKILL_TYPES if needed, although we are not really using it. Signed-off-by: Ruediger Meier --- diff --git a/sys-utils/rfkill.c b/sys-utils/rfkill.c index 75804ad41e..031fe436fd 100644 --- a/sys-utils/rfkill.c +++ b/sys-utils/rfkill.c @@ -45,7 +45,12 @@ * year 2009 (2.6.33) or older. */ #ifndef RFKILL_TYPE_NFC +# ifndef RFKILL_TYPE_FM +# define RFKILL_TYPE_FM RFKILL_TYPE_GPS + 1 +# endif # define RFKILL_TYPE_NFC RFKILL_TYPE_FM + 1 +# undef NUM_RFKILL_TYPES +# define NUM_RFKILL_TYPES RFKILL_TYPE_NFC + 1 #endif struct rfkill_type_str {