selftests/ir: fix build with ancient kernel headers
Subsystems (2)
PATCH v2 1/1 selftests/ir: fix build with ancient kernel headers
Since commit e2bcbd7769ee ("tools headers UAPI: remove stale lirc.h"), the build of the selftests fails on rhel 8 since its version of /usr/include/linux/lirc.h has no definition of RC_PROTO_RCMM32, etc [1].
[1] https://lkml.org/lkml/2022/1/28/275
Fixes e2bcbd7769ee ("tools headers UAPI: remove stale lirc.h")
Reviewed-by Shuah Khan <[email protected]>
Reported-by kernel test robot <[email protected]>
Signed-off-by Sean Young <[email protected]>
--- tools/testing/selftests/ir/ir_loopback.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
tools/testing/selftests/ir/ir_loopback.c +10 -0
@@ -29,6 +29,16 @@#define SYSFS_PATH_MAX 256#define DNAME_PATH_MAX 256 +/* +* Support ancient lirc.h which does not have these values. Can be removed +* once RHEL 8 is no longer a relevant testing platform. +*/ +#if RC_PROTO_MAX <26 +#define RC_PROTO_RCMM12 24 +#define RC_PROTO_RCMM24 25 +#define RC_PROTO_RCMM32 26 +#endif + static const struct { enum rc_proto proto; const char *name;
Signature · 1 line
2.34.1
Shuah Khan
maintainerQuoted 11 lines · Sean Young
Since commit
e2bcbd7769ee("tools headers UAPI: remove stalelirc.h"), the build of the selftests fails on rhel 8 since its version of/usr/include/linux/lirc.hhas no definition ofRC_PROTO_RCMM32, etc [1].[1] https://lkml.org/lkml/2022/1/28/275
Fixes e2bcbd7769ee ("tools headers UAPI: remove stale lirc.h")Reviewed-by Shuah Khan <[email protected]>Reported-by kernel test robot <[email protected]>Signed-off-by Sean Young <[email protected]>---
Applied now to linux-kselftest fixes branch - decided to take it through since there is no real dependency on previous patch as far as the change goes.
Fixes e2bcbd7769ee ("tools headers UAPI: remove stale lirc.h")
thanks,
-- Shuah