Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5953888ybp; Tue, 15 Oct 2019 07:30:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqybiH+wPQhE29rJJ6fl5iQ3ECf2SazwCBxtxqDFBOG445MTr/KT3E+QYOG8TA0dbcHzvvUg X-Received: by 2002:a50:d70c:: with SMTP id t12mr34003108edi.252.1571149823180; Tue, 15 Oct 2019 07:30:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571149823; cv=none; d=google.com; s=arc-20160816; b=T1wxExJvWcpLYkWXbI+zKUcuz4tCqpxpgeJRrzzJz/Ejti9hobK+jl9i9w0Cwd52ur 5Gl5avdXWUHWm54MicHBURrOJmxRTj5WvtSUCsH3ga57+vgn5ytAsh1m6cradTAg3peb 9okb5ZGPCegx3lr6MrnXY36QtJT8xl1pGYBbcVfm00Z2IuVFe5mY+HaO0ULrw8C3WJ3D PxO0wIsh9YYiWzyjTBpIswxH5i9kDegy+kH0i4WAZ1kaWiuqSlYVOVUqJkY7I+iLsytw oyzD+fDSueECbNs2QXoV9dlOfKDUotZoMKu5zdGX+VDybx6TdOmsdtEJ/H0DI+13NIyw /A6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=pb+QTLEL/20o8bSbhdudEJBEHJmsetCBOpBHs97r+qI=; b=Yz7/JhJS31bAvVLpApuda1RsiT0fas9FAeEZpydpfE5z/G2t1QwAu6run6pkYjA87H pUKtxCLCK+QMh9lcyQAvIQpZSKnPoL4zI9hVo7SQmXBVmGcu3SSGw0rxNMI6Hy3FMZX5 k3uOtMCroHOmYj3o3iU+ywgJXXg0bAwivuXUJN2Vsz2OhC0BvZAp+RGyOtJRVGs/qpDM MDW5+w3dfPwWs4MCJVr5mn+K8ejCxBJ5JuHzgJomgr4UDVr7LqFT7eT0TN64Bj+grAHs fMuTDXq7x3S9Axf+J7f/vokZ6yGIXgppd4ZOn11K/v2+LtRC8TjJgQwyqgUJj+E7nMVu JjJw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n9si12868310ejk.158.2019.10.15.07.29.59; Tue, 15 Oct 2019 07:30:23 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732739AbfJOO2u (ORCPT + 99 others); Tue, 15 Oct 2019 10:28:50 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:40211 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732087AbfJOO2u (ORCPT ); Tue, 15 Oct 2019 10:28:50 -0400 Received: from [213.220.153.21] (helo=wittgenstein) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iKNoe-0005gW-JJ; Tue, 15 Oct 2019 14:28:48 +0000 Date: Tue, 15 Oct 2019 16:28:48 +0200 From: Christian Brauner To: Christian Kellner Cc: linux-kernel@vger.kernel.org, Christian Kellner , Shuah Khan , linux-kselftest@vger.kernel.org Subject: Re: [PATCH] pidfd: fix selftest compilation by removing linux/wait.h Message-ID: <20191015142847.fa5ypv2qrocbuifd@wittgenstein> References: <20191011163811.8607-1-ckellner@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20191011163811.8607-1-ckellner@redhat.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 11, 2019 at 06:38:11PM +0200, Christian Kellner wrote: > From: Christian Kellner > > The pidfd_{open,poll}_test.c files both include `linux/wait.h` and > later `sys/wait.h`. The former has `#define P_ALL 0`, but in the > latter P_ALL is part of idtype_t enum, where it gets substituted > due to the aforementioned define to be `0`, which then results in > `typedef enum {0, ...`, which then results into a compiler error: > "error: expected identifier before numeric constant". > Since we need `sys/wait.h` for waitpid, drop `linux/wait.h`. > > Signed-off-by: Christian Kellner Sorry, I missed this patch. This is problematic and your patch would only temporarily fix it. If glibc adds a P_PIDFD to the enum we'll run into the same issue. So please: - remove the linux/wait.h header (as you've already done here) - add a custom define for P_PIDFD under a different name, e.g.: #ifndef __P_PIDFD #define __P_PIDFD 3 #endif and add a comment above it explaining the reason for this mess. Thanks and (_ugh_) Christian