[1/3] pidfd_send_signal: Build with _GNU_SOURCE
diff mbox series

Message ID 20200117113715.22786-2-pvorel@suse.cz
State Accepted
Delegated to: Petr Vorel
Headers show
Series
  • Fixes for old distros
Related show

Commit Message

Petr Vorel Jan. 17, 2020, 11:37 a.m. UTC
This adds missing O_CLOEXEC and O_DIRECTORY on old distros,
where it's (in glibc) guarded under __USE_GNU.

This was needed on SLES 11 (glibc 2.11).

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 .../kernel/syscalls/pidfd_send_signal/pidfd_send_signal01.c      | 1 +
 .../kernel/syscalls/pidfd_send_signal/pidfd_send_signal02.c      | 1 +
 .../kernel/syscalls/pidfd_send_signal/pidfd_send_signal03.c      | 1 +
 3 files changed, 3 insertions(+)

Patch
diff mbox series

diff --git a/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal01.c b/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal01.c
index f03905894..b529551d2 100644
--- a/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal01.c
+++ b/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal01.c
@@ -9,6 +9,7 @@ 
  * struct is passed.
  */
 
+#define _GNU_SOURCE
 #include <signal.h>
 #include <stdlib.h>
 #include "tst_safe_pthread.h"
diff --git a/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal02.c b/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal02.c
index c933ada84..74914523f 100644
--- a/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal02.c
+++ b/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal02.c
@@ -21,6 +21,7 @@ 
  *    -> EPERM
  */
 
+#define _GNU_SOURCE
 #include <pwd.h>
 #include <signal.h>
 #include "tst_safe_pthread.h"
diff --git a/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal03.c b/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal03.c
index 19d943d06..3420afbb9 100644
--- a/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal03.c
+++ b/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal03.c
@@ -15,6 +15,7 @@ 
  * child using the pidfd of the first one.
  */
 
+#define _GNU_SOURCE
 #include <signal.h>
 #include <stdio.h>
 #include <unistd.h>