From patchwork Sat Oct 30 04:59:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrii Nakryiko X-Patchwork-Id: 12594167 X-Patchwork-Delegate: bpf@iogearbox.net 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1E6BC433EF for ; Sat, 30 Oct 2021 04:59:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A58B861054 for ; Sat, 30 Oct 2021 04:59:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230012AbhJ3FCU convert rfc822-to-8bit (ORCPT ); Sat, 30 Oct 2021 01:02:20 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:52056 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230002AbhJ3FCU (ORCPT ); Sat, 30 Oct 2021 01:02:20 -0400 Received: from pps.filterd (m0109333.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19U2f92A009175 for ; Fri, 29 Oct 2021 21:59:50 -0700 Received: from mail.thefacebook.com ([163.114.132.120]) by mx0a-00082601.pphosted.com with ESMTP id 3c0qu529v6-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 29 Oct 2021 21:59:50 -0700 Received: from intmgw001.05.prn6.facebook.com (2620:10d:c085:208::11) by mail.thefacebook.com (2620:10d:c085:21d::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Fri, 29 Oct 2021 21:59:49 -0700 Received: by devbig019.vll3.facebook.com (Postfix, from userid 137359) id 72CD4783050C; Fri, 29 Oct 2021 21:59:45 -0700 (PDT) From: Andrii Nakryiko To: , , CC: , , Hengqi Chen Subject: [PATCH bpf-next 01/14] bpftool: fix unistd.h include Date: Fri, 29 Oct 2021 21:59:28 -0700 Message-ID: <20211030045941.3514948-2-andrii@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211030045941.3514948-1-andrii@kernel.org> References: <20211030045941.3514948-1-andrii@kernel.org> MIME-Version: 1.0 X-FB-Internal: Safe X-FB-Source: Intern X-Proofpoint-GUID: nZInxJnVHeMU-zM22p5IvxP3TwADj496 X-Proofpoint-ORIG-GUID: nZInxJnVHeMU-zM22p5IvxP3TwADj496 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-30_01,2021-10-29_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 spamscore=0 mlxlogscore=929 malwarescore=0 suspectscore=0 bulkscore=0 mlxscore=0 clxscore=1015 priorityscore=1501 phishscore=0 impostorscore=0 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2110300025 X-FB-Internal: deliver Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net cgroup.c in bpftool source code is defining _XOPEN_SOURCE 500, which, apparently, makes syscall() unavailable. Which is a problem now that libbpf exposes syscal()-usign bpf() API in bpf.h. Fix by defining _GNU_SOURCE instead, which enables syscall() wrapper. Signed-off-by: Andrii Nakryiko --- tools/bpf/bpftool/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bpf/bpftool/cgroup.c b/tools/bpf/bpftool/cgroup.c index 3571a281c43f..4876364e753d 100644 --- a/tools/bpf/bpftool/cgroup.c +++ b/tools/bpf/bpftool/cgroup.c @@ -2,7 +2,7 @@ // Copyright (C) 2017 Facebook // Author: Roman Gushchin -#define _XOPEN_SOURCE 500 +#define _GNU_SOURCE #include #include #include