Skip to content

Commit

Permalink
selftests/ir: fix build with ancient kernel headers
Browse files Browse the repository at this point in the history
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 <skhan@linuxfoundation.org>
Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
  • Loading branch information
Sean Young authored and Shuah Khan committed Feb 4, 2022
1 parent e2aa5e6 commit 183f80f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tools/testing/selftests/ir/ir_loopback.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 183f80f

Please sign in to comment.