From patchwork Mon Jun 19 21:33:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Stringer X-Patchwork-Id: 777982 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ws43T1jDmz9s2G for ; Tue, 20 Jun 2017 07:33:41 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id A7EEEB5D; Mon, 19 Jun 2017 21:33:37 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id CDCB2B4C for ; Mon, 19 Jun 2017 21:33:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 39D9B15A for ; Mon, 19 Jun 2017 21:33:35 +0000 (UTC) Received: from mfilter19-d.gandi.net (mfilter19-d.gandi.net [217.70.178.147]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id 0F763FB8B1; Mon, 19 Jun 2017 23:33:34 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter19-d.gandi.net Received: from relay6-d.mail.gandi.net ([IPv6:::ffff:217.70.183.198]) by mfilter19-d.gandi.net (mfilter19-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id THu4AvW37-42; Mon, 19 Jun 2017 23:33:32 +0200 (CEST) X-Originating-IP: 208.91.1.34 Received: from carno.eng.vmware.com (unknown [208.91.1.34]) (Authenticated sender: joe@ovn.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id AF49FFB8BC; Mon, 19 Jun 2017 23:33:30 +0200 (CEST) From: Joe Stringer To: dev@openvswitch.org Date: Mon, 19 Jun 2017 14:33:22 -0700 Message-Id: <20170619213323.14220-1-joe@ovn.org> X-Mailer: git-send-email 2.11.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Simon Horman , Flavio Leitner Subject: [ovs-dev] [PATCH 1/2] tc: Fix compile with Glibc < 2.24 and Linux > 4.5. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org linux/pkt_cls.h indirectly includes linux/stddef.h, which may define __always_inline when using Linux kernel headers 4.6 or later. netinet/in.h indirectly includes sys/cdefs.h, which before Glibc 2.24 would unconditionally define __always_inline. This combination of headers causes compilation failure. Resolve the issue by placing the netinet/in.h include above linux/pkt_cls.h. Sourceware-BZ: #20215. Fixes: f98e418fbdb6 ("tc: Add tc flower functions") Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- lib/tc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tc.h b/lib/tc.h index a472b998f638..61188dd43ec3 100644 --- a/lib/tc.h +++ b/lib/tc.h @@ -18,10 +18,10 @@ #ifndef TC_H #define TC_H 1 +#include /* Must happen before linux/pkt_cls.h - Glibc #20215 */ #include #include #include -#include #include "lib/netlink-socket.h" #include "odp-netlink.h" #include "openvswitch/ofpbuf.h"