Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp11812pxb; Fri, 15 Jan 2021 04:38:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJwOH9TmtCJiIVf0Ck2JxEZYr1xYmkHVy/VyGt6ApsVJtsiDI+fpjMhv0htedW6tju9wpOOY X-Received: by 2002:a17:906:4c48:: with SMTP id d8mr8616336ejw.358.1610714307199; Fri, 15 Jan 2021 04:38:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610714307; cv=none; d=google.com; s=arc-20160816; b=RiDAfvgRHcGyD59kJk2Qq5BhoFMt3pxfxPLUXJ8hYGIvuVlkLhy+HZU6Dlaxli4hcp tt+rn02h/5Fq2o0+t+YUQcZVT5R438AaMGxWbfdLdpzMnUFhA9faZUwMpoU/5MyPvvaR rRWytPPzMvztwZXBR2qsck0oj+5MiBDK9ds921YwNxKFn5FrBNchdiw1m2U2vHy1a7YO lc3QdNBlG8rBgiVZgvaikC9x8o5qDTesftam8h7hUxxZ4NgutEQ9VkA79tRReU28ga0t Hj0opNhMbRHmCsOkMBhaZY28PGypYk/u8RdU1P1QYpN9p/s0ESTWVLWoxGdhm79ihWTP YB3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pFMOHitfOIZnnaSTCM3QlzEQlEppCR1f8FT1gd4H+TM=; b=MCfx6vCskbFRqsO578PmJWfQA3jtEu4eJfNpTvOS3nWS3CxgFiVWPuO1LIK7XSRgaI wK+YHaORFPxscyS9Gb/bkNA52XiRqPhLaFsJ0kJzA9ZwoFn6Ie0nJS6LFGwzJ2qMKYsq CL1oaGQeQfKvk0bDiCPjbs601TFmcGRBkTAPX1w9fk412mkDzHKJNyI0OQiNsiPbwOhn jmh3zsKnk25oLUOLf6IMbBntfH+qaE/oil9D6BQQ3K4UT8Rksf/AyPdlUQ0GVQcDI9Kg bZbmuYOgHnXG6KWyB+GokJBIPGcQvqg4hYYLgwgQL5ED72EGpt6EzUHLAP3b9aPIa0BZ CkMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dA5B8Arv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c6si3718168ejr.727.2021.01.15.04.38.03; Fri, 15 Jan 2021 04:38:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dA5B8Arv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733117AbhAOMgQ (ORCPT + 99 others); Fri, 15 Jan 2021 07:36:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:42934 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387815AbhAOMgF (ORCPT ); Fri, 15 Jan 2021 07:36:05 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2774F221FA; Fri, 15 Jan 2021 12:35:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610714149; bh=IsMOhJZgaQ8xgAglxugKq3jDm3BwXHDoowige6vSB/k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dA5B8Arvkdl1E+jIW3n3DCgDZ8XcnVkhB5zr/lP++kc8+ySG8bxLACbsscmJuWSBx PORBofmU3O0hAYE+nvDejafVkF1TIoPThX6hc6r/mJ6MuY1mKY4zqXoy/7qdGndsEs 1/0UwxuCyjuUp6xY7uGXGTbH88NHfNt/l+Pm3E4Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alan Maguire , Andrii Nakryiko , Martin KaFai Lau Subject: [PATCH 5.4 52/62] bpftool: Fix compilation failure for net.o with older glibc Date: Fri, 15 Jan 2021 13:28:14 +0100 Message-Id: <20210115122000.903449640@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210115121958.391610178@linuxfoundation.org> References: <20210115121958.391610178@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alan Maguire commit 6f02b540d7597f357bc6ee711346761045d4e108 upstream. For older glibc ~2.17, #include'ing both linux/if.h and net/if.h fails due to complaints about redefinition of interface flags: CC net.o In file included from net.c:13:0: /usr/include/linux/if.h:71:2: error: redeclaration of enumerator ‘IFF_UP’ IFF_UP = 1<<0, /* sysfs */ ^ /usr/include/net/if.h:44:5: note: previous definition of ‘IFF_UP’ was here IFF_UP = 0x1, /* Interface is up. */ The issue was fixed in kernel headers in [1], but since compilation of net.c picks up system headers the problem can recur. Dropping #include resolves the issue and it is not needed for compilation anyhow. [1] https://lore.kernel.org/netdev/1461512707-23058-1-git-send-email-mikko.rapeli__34748.27880641$1462831734$gmane$org@iki.fi/ Fixes: f6f3bac08ff9 ("tools/bpf: bpftool: add net support") Signed-off-by: Alan Maguire Signed-off-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/1609948746-15369-1-git-send-email-alan.maguire@oracle.com Signed-off-by: Greg Kroah-Hartman --- tools/bpf/bpftool/net.c | 1 - 1 file changed, 1 deletion(-) --- a/tools/bpf/bpftool/net.c +++ b/tools/bpf/bpftool/net.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include