summaryrefslogtreecommitdiffstats
path: root/sys-utils/rfkill.c
diff options
context:
space:
mode:
authorRuediger Meier2018-01-23 16:59:28 +0100
committerKarel Zak2018-01-24 12:53:36 +0100
commit40defd0c4d6a2a3f4b40842c3b8798755a5c1ef1 (patch)
tree454ebd77a9636717300b35bc3ef046223848889d /sys-utils/rfkill.c
parenttests: fix fincore/count KNOWN_FAIL (diff)
downloadkernel-qcow2-util-linux-40defd0c4d6a2a3f4b40842c3b8798755a5c1ef1.tar.gz
kernel-qcow2-util-linux-40defd0c4d6a2a3f4b40842c3b8798755a5c1ef1.tar.xz
kernel-qcow2-util-linux-40defd0c4d6a2a3f4b40842c3b8798755a5c1ef1.zip
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 <ruediger.meier@ga-group.nl>
Diffstat (limited to 'sys-utils/rfkill.c')
-rw-r--r--sys-utils/rfkill.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys-utils/rfkill.c b/sys-utils/rfkill.c
index 75804ad41..031fe436f 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 {