]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
rfkill: provide RFKILL_TYPE_FM if undefined
authorRuediger Meier <ruediger.meier@ga-group.nl>
Tue, 23 Jan 2018 15:59:28 +0000 (16:59 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 24 Jan 2018 11:53:36 +0000 (12:53 +0100)
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 <ruediger.meier@ga-group.nl>
sys-utils/rfkill.c

index 75804ad41e6525014f4b34daf01b02ff5474c07a..031fe436fd4fb310612498d64d447825228a0803 100644 (file)
  * 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 {