Skip to content

Commit 183f80f

Browse files
seanyoungshuahkh
authored andcommitted
selftests/ir: fix build with ancient kernel headers
Since commit e2bcbd7 ("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: e2bcbd7 ("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]> Signed-off-by: Shuah Khan <[email protected]>
1 parent e2aa5e6 commit 183f80f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tools/testing/selftests/ir/ir_loopback.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@
2929
#define SYSFS_PATH_MAX 256
3030
#define DNAME_PATH_MAX 256
3131

32+
/*
33+
* Support ancient lirc.h which does not have these values. Can be removed
34+
* once RHEL 8 is no longer a relevant testing platform.
35+
*/
36+
#if RC_PROTO_MAX < 26
37+
#define RC_PROTO_RCMM12 24
38+
#define RC_PROTO_RCMM24 25
39+
#define RC_PROTO_RCMM32 26
40+
#endif
41+
3242
static const struct {
3343
enum rc_proto proto;
3444
const char *name;

0 commit comments

Comments
 (0)