Skip to content

Commit 2c14d95

Browse files
committed
pidfd_send_signal: Build with _GNU_SOURCE
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). Acked-by: Jan Stancek <[email protected]> Signed-off-by: Petr Vorel <[email protected]>
1 parent e0c7b1d commit 2c14d95

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal01.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* struct is passed.
1010
*/
1111

12+
#define _GNU_SOURCE
1213
#include <signal.h>
1314
#include <stdlib.h>
1415
#include "tst_safe_pthread.h"

testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal02.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
* -> EPERM
2222
*/
2323

24+
#define _GNU_SOURCE
2425
#include <pwd.h>
2526
#include <signal.h>
2627
#include "tst_safe_pthread.h"

testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal03.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* child using the pidfd of the first one.
1616
*/
1717

18+
#define _GNU_SOURCE
1819
#include <signal.h>
1920
#include <stdio.h>
2021
#include <unistd.h>

0 commit comments

Comments
 (0)