archive mirror
 help / color / mirror / Atom feed
From: Christian Brauner <>
To: Christian Kellner <>
	Christian Kellner <>,
	Shuah Khan <>,
Subject: Re: [PATCH] pidfd: fix selftest compilation by removing linux/wait.h
Date: Tue, 15 Oct 2019 16:28:48 +0200	[thread overview]
Message-ID: <20191015142847.fa5ypv2qrocbuifd@wittgenstein> (raw)
In-Reply-To: <>

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
  and add a comment above it explaining the reason for this mess.

Thanks and (_ugh_)

  reply	other threads:[~2019-10-15 14:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-11 16:38 [PATCH] pidfd: fix selftest compilation by removing linux/wait.h Christian Kellner
2019-10-15 14:28 ` Christian Brauner [this message]
2019-10-15 16:55 ` [PATCH v2] pidfd: avoid linux/wait.h and sys/wait.h name clashes Christian Kellner
2019-10-15 19:38   ` Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191015142847.fa5ypv2qrocbuifd@wittgenstein \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).