From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 570F9C433F5 for ; Tue, 1 Feb 2022 16:53:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241259AbiBAQxO (ORCPT ); Tue, 1 Feb 2022 11:53:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229861AbiBAQxN (ORCPT ); Tue, 1 Feb 2022 11:53:13 -0500 Received: from gofer.mess.org (gofer.mess.org [IPv6:2a02:8011:d000:212::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB44BC061714 for ; Tue, 1 Feb 2022 08:53:13 -0800 (PST) Received: by gofer.mess.org (Postfix, from userid 1000) id 9C4FA101BFE; Tue, 1 Feb 2022 16:53:11 +0000 (UTC) Date: Tue, 1 Feb 2022 16:53:11 +0000 From: Sean Young To: Shuah Khan Cc: Alexei Starovoitov , kernel test robot , Alexei Starovoitov , LKML , Linux Memory Management List , lkp@lists.01.org, kbuild test robot Subject: [PATCH] selftests/ir: fix build with ancient kernel headers Message-ID: References: <20220128075346.GG8421@xsang-OptiPlex-9020> <347bae9f-f775-4976-3d27-b0c725211d78@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <347bae9f-f775-4976-3d27-b0c725211d78@linuxfoundation.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Fixes: e2bcbd7769ee ("tools headers UAPI: remove stale lirc.h") Reported-by: kernel test robot Signed-off-by: Sean Young --- tools/testing/selftests/ir/ir_loopback.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/testing/selftests/ir/ir_loopback.c b/tools/testing/selftests/ir/ir_loopback.c index 06256c96df12..8dc104690adc 100644 --- a/tools/testing/selftests/ir/ir_loopback.c +++ b/tools/testing/selftests/ir/ir_loopback.c @@ -29,6 +29,13 @@ #define SYSFS_PATH_MAX 256 #define DNAME_PATH_MAX 256 +/* Support ancient lirc.h which does not have these values */ +#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; -- 2.34.1