diff mbox series

[02/13] selftests: pidfd: fix compilation errors due to wait.h

Message ID 20201008122633.687877-3-tommi.t.rantala@nokia.com
State Accepted
Headers show
Series selftests fixes | expand

Commit Message

Tommi Rantala Oct. 8, 2020, 12:26 p.m. UTC
Drop unneeded <linux/wait.h> header inclusion to fix pidfd compilation
errors seen in Fedora 32:

In file included from pidfd_open_test.c:9:
../../../../usr/include/linux/wait.h:17:16: error: expected identifier before numeric constant
   17 | #define P_ALL  0
      |                ^

Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com>
---
 tools/testing/selftests/pidfd/pidfd_open_test.c | 1 -
 tools/testing/selftests/pidfd/pidfd_poll_test.c | 1 -
 2 files changed, 2 deletions(-)

Comments

Kees Cook Oct. 8, 2020, 8:12 p.m. UTC | #1
On Thu, Oct 08, 2020 at 03:26:22PM +0300, Tommi Rantala wrote:
> Drop unneeded <linux/wait.h> header inclusion to fix pidfd compilation
> errors seen in Fedora 32:
> 
> In file included from pidfd_open_test.c:9:
> ../../../../usr/include/linux/wait.h:17:16: error: expected identifier before numeric constant
>    17 | #define P_ALL  0
>       |                ^
> 
> Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com>

Reviewed-by: Kees Cook <keescook@chromium.org>
Christian Brauner Oct. 9, 2020, 9:43 a.m. UTC | #2
On Thu, Oct 08, 2020 at 03:26:22PM +0300, Tommi Rantala wrote:
> Drop unneeded <linux/wait.h> header inclusion to fix pidfd compilation
> errors seen in Fedora 32:
> 
> In file included from pidfd_open_test.c:9:
> ../../../../usr/include/linux/wait.h:17:16: error: expected identifier before numeric constant
>    17 | #define P_ALL  0
>       |                ^
> 
> Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com>
> ---

Thanks!
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
diff mbox series

Patch

diff --git a/tools/testing/selftests/pidfd/pidfd_open_test.c b/tools/testing/selftests/pidfd/pidfd_open_test.c
index b9fe75fc3e51..8a59438ccc78 100644
--- a/tools/testing/selftests/pidfd/pidfd_open_test.c
+++ b/tools/testing/selftests/pidfd/pidfd_open_test.c
@@ -6,7 +6,6 @@ 
 #include <inttypes.h>
 #include <limits.h>
 #include <linux/types.h>
-#include <linux/wait.h>
 #include <sched.h>
 #include <signal.h>
 #include <stdbool.h>
diff --git a/tools/testing/selftests/pidfd/pidfd_poll_test.c b/tools/testing/selftests/pidfd/pidfd_poll_test.c
index 4b115444dfe9..610811275357 100644
--- a/tools/testing/selftests/pidfd/pidfd_poll_test.c
+++ b/tools/testing/selftests/pidfd/pidfd_poll_test.c
@@ -3,7 +3,6 @@ 
 #define _GNU_SOURCE
 #include <errno.h>
 #include <linux/types.h>
-#include <linux/wait.h>
 #include <poll.h>
 #include <signal.h>
 #include <stdbool.h>