Received: by 10.223.185.116 with SMTP id b49csp1043515wrg; Wed, 21 Feb 2018 11:05:44 -0800 (PST) X-Google-Smtp-Source: AH8x226Wd9IVf4HfqYEdqWUfY4+z7y4NiXV572VKKIbqmz78XMWiHIY8NpwoUyzjkEppZFswXQ36 X-Received: by 2002:a17:902:5e3:: with SMTP id f90-v6mr4031545plf.413.1519239944778; Wed, 21 Feb 2018 11:05:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519239944; cv=none; d=google.com; s=arc-20160816; b=qBtxBW1F4Lv0eWyZjGfumwABT3hAc3kItTNCWmwgRcKZNi2HUSFhughjQrF5YjOFPt rSgJxO6FjLWlSiB7da5BjqIdSxhRG35n4Tca22aP0b37VYi9Z0zbwEjJHkydDAsGzWiD xT35ogRuALIEdskKyt808Sd4VDLKRxW4DgpS+pZwTz5QsufWonUi50bz/5RgUH738DvS slLADGVp4iuh1oupZJKhpdJen4h1FZx0K1kfBLH3CxuODCxDX1LO6K+JU/PSn7Ccs7KR 0du8l7CafEPEHHZkWmGYa2G1W7IScE4vQ90RolQGfl6R3vjNFIwU74gxiYnhrKFNuFOX w4/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=SWihVnGlC9SsEMZg5ueiaptoeRS4NUvARnUTjWUi7Zg=; b=YxIYYnhEuw49rQXYrzrtuPcL8FxwvQv+bYEi5i6ikWSdMJmzsfZ6gEOBjcPqnPec+D 4iosijSX94xZcG5iSCkIxrq1nsQwGEabqZsRYZldDYvW5QJf6y/s3qUcKqIcudzfaFXQ 4H2N1K2v5hFe+4wewvCUyu+JgyZxLtYXAO3xLcR+r0Q+91zBdWPSKvGn++rLzZDo+JlK r7oCPeK8Pvjm1cbyCBrDbj1FC0P7F5FDPH4vuw0AnlHci5cnIcvZ9hx4Bjsuttv22V2b gHjj91hNdxQH1pT1e9M1+9bx3/Hb2BPH/cIRPt1j9wt+fgpzwbSYdT3FpI7/vL7oQE7r JH7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CeG76KBV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c23-v6si249409plo.45.2018.02.21.11.05.30; Wed, 21 Feb 2018 11:05:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CeG76KBV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754328AbeBUQvn (ORCPT + 99 others); Wed, 21 Feb 2018 11:51:43 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:33682 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753555AbeBUQvk (ORCPT ); Wed, 21 Feb 2018 11:51:40 -0500 Received: by mail-lf0-f65.google.com with SMTP id o145so82565lff.0 for ; Wed, 21 Feb 2018 08:51:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SWihVnGlC9SsEMZg5ueiaptoeRS4NUvARnUTjWUi7Zg=; b=CeG76KBV0WUVAbXcmBSv+qmdEHTxEtWKAU5LcEROI/QTqTt/rRbsxL96c7YgDb74w/ V5zhtRbUfNEhQ9+5t6JQCy5c0q1ceQrLQ6K72m9RkZesI/EFeEQK+0FOo3kWHFrS45XY 0gi8fmhStLtvwWkxAcl/8BUT4q3sf0Vw/ySUQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SWihVnGlC9SsEMZg5ueiaptoeRS4NUvARnUTjWUi7Zg=; b=gFlDH8mmgh6TKU3cLfPA4/BkOhYvV6Mvw9wVyVnH+KP0SPtrgjkcpzLYLwXfLjM57R SKBx1jytvdFYiRbyrfisTalJ+eBRjcVOSJ5fGu1BeX9vWrXe2s169SVXTXwDJt0+Agki G/zDwV0pmgbDuivdDd1FU3K0IPenj0MXgIE1r8G1JvulsXA0aMkltOMgxeNKojenoKbk 39UmEOXLIiBVKr6CUtVMhFLEJPg0CJEsHgChELHkZhj+caGCUCy6+azyhL5390Qvlkg9 WTyoUYSG/iz8uSSIdcY+qe16xj04gfjXzr1c7E94ajC53y2emxa7eGMyRDYw3h39Jf3W dutg== X-Gm-Message-State: APf1xPCV8woJEqMP4N1ZQNSaRlOHVjWONB1+xpg3wg8QqsC0orKq7O1F u5Gp6gU3wXemzB4R22X89pRlMv3iHbU= X-Received: by 10.46.13.10 with SMTP id 10mr3037508ljn.8.1519231898660; Wed, 21 Feb 2018 08:51:38 -0800 (PST) Received: from localhost (c-2c3d70d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.61.44]) by smtp.gmail.com with ESMTPSA id o77sm1421211lja.43.2018.02.21.08.51.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Feb 2018 08:51:37 -0800 (PST) From: Anders Roxell To: shuah@kernel.org Cc: daniel@iogearbox.net, ast@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Anders Roxell Subject: [PATCH] selftests/bpf: tcpbpf_kern: use in6_* macros from glibc Date: Wed, 21 Feb 2018 17:51:16 +0100 Message-Id: <20180221165116.9754-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.11.0 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 Both glibc and the kernel have in6_* macros definitions. Build fails because it picks up wrong in6_* macro from the kernel header and not the header from glibc. Fixes build error below: clang -I. -I./include/uapi -I../../../include/uapi -Wno-compare-distinct-pointer-types \ -O2 -target bpf -emit-llvm -c test_tcpbpf_kern.c -o - | \ llc -march=bpf -mcpu=generic -filetype=obj -o .../tools/testing/selftests/bpf/test_tcpbpf_kern.o In file included from test_tcpbpf_kern.c:12: .../netinet/in.h:101:5: error: expected identifier IPPROTO_HOPOPTS = 0, /* IPv6 Hop-by-Hop options. */ ^ .../linux/in6.h:131:26: note: expanded from macro 'IPPROTO_HOPOPTS' ^ In file included from test_tcpbpf_kern.c:12: /usr/include/netinet/in.h:103:5: error: expected identifier IPPROTO_ROUTING = 43, /* IPv6 routing header. */ ^ .../linux/in6.h:132:26: note: expanded from macro 'IPPROTO_ROUTING' ^ In file included from test_tcpbpf_kern.c:12: .../netinet/in.h:105:5: error: expected identifier IPPROTO_FRAGMENT = 44, /* IPv6 fragmentation header. */ ^ Since both glibc and the kernel have in6_* macros definitions, use the one from glibc. Kernel headers will check for previous libc definitions by including include/linux/libc-compat.h. Reported-by: Daniel Díaz Signed-off-by: Anders Roxell --- tools/testing/selftests/bpf/test_tcpbpf_kern.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/bpf/test_tcpbpf_kern.c b/tools/testing/selftests/bpf/test_tcpbpf_kern.c index 57119ad57a3f..3e645ee41ed5 100644 --- a/tools/testing/selftests/bpf/test_tcpbpf_kern.c +++ b/tools/testing/selftests/bpf/test_tcpbpf_kern.c @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include -- 2.11.0