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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7D1EC2BB55 for ; Thu, 16 Apr 2020 15:50:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B74D6214AF for ; Thu, 16 Apr 2020 15:50:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587052246; bh=51H9TY8V5noS4FlXlFD3P5jsli5RDi0dx8xUt4ONeBk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=FL154E1CdXGA+S1ttOFvei0VWI/DEo0vVXG7Nt5h9U45igTmbYKX07z8yBDaSsndH GhdIefLmKX1RwRGNP8nv7NotDUtHOjS3WJwTu3Dpdc2rtd4ypk0lFRlMx/cDxabGCd rkvkLr1Hok0AeGDwWWDFperoTyoBFIAKtVJyTwvk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407339AbgDPPuo (ORCPT ); Thu, 16 Apr 2020 11:50:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:44142 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2896599AbgDPNc5 (ORCPT ); Thu, 16 Apr 2020 09:32:57 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 594AD22276; Thu, 16 Apr 2020 13:32:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587043951; bh=51H9TY8V5noS4FlXlFD3P5jsli5RDi0dx8xUt4ONeBk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QyUw74W4JPNWl11C8ExvGxgIH74Sv8L8NfTmnojk1b6abKC2hITM7G9mQ2vHxZr9F Uu5Wy1spTZbeNyqbqHpc4dzvoZQtu8z6OrzfPD4euhslTJidak9pdkWpGdpbVGD5IW nM3NKpo3badFiFCZX/gB+j6NSQY+HgG6UZIGGNUY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alan Maguire , "David S. Miller" , Sasha Levin Subject: [PATCH 5.5 020/257] selftests/net: add definition for SOL_DCCP to fix compilation errors for old libc Date: Thu, 16 Apr 2020 15:21:11 +0200 Message-Id: <20200416131328.442444652@linuxfoundation.org> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200416131325.891903893@linuxfoundation.org> References: <20200416131325.891903893@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alan Maguire [ Upstream commit 83a9b6f639e9f6b632337f9776de17d51d969c77 ] Many systems build/test up-to-date kernels with older libcs, and an older glibc (2.17) lacks the definition of SOL_DCCP in /usr/include/bits/socket.h (it was added in the 4.6 timeframe). Adding the definition to the test program avoids a compilation failure that gets in the way of building tools/testing/selftests/net. The test itself will work once the definition is added; either skipping due to DCCP not being configured in the kernel under test or passing, so there are no other more up-to-date glibc dependencies here it seems beyond that missing definition. Fixes: 11fb60d1089f ("selftests: net: reuseport_addr_any: add DCCP") Signed-off-by: Alan Maguire Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- tools/testing/selftests/net/reuseport_addr_any.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/net/reuseport_addr_any.c b/tools/testing/selftests/net/reuseport_addr_any.c index c6233935fed14..b8475cb29be7a 100644 --- a/tools/testing/selftests/net/reuseport_addr_any.c +++ b/tools/testing/selftests/net/reuseport_addr_any.c @@ -21,6 +21,10 @@ #include #include +#ifndef SOL_DCCP +#define SOL_DCCP 269 +#endif + static const char *IP4_ADDR = "127.0.0.1"; static const char *IP6_ADDR = "::1"; static const char *IP4_MAPPED6 = "::ffff:127.0.0.1"; -- 2.20.1