From d982ea6eee77c173231f55fea852d9d61788c38a Mon Sep 17 00:00:00 2001 From: David Carlier Date: Mon, 6 Dec 2021 07:55:21 +0000 Subject: [PATCH] linux add pidfd_open syscall mode --- libc-test/build.rs | 3 +++ src/unix/linux_like/linux/gnu/mod.rs | 1 + 2 files changed, 4 insertions(+) diff --git a/libc-test/build.rs b/libc-test/build.rs index 38ca7d0d76122..ad023fbd849a2 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -3150,6 +3150,9 @@ fn test_linux(target: &str) { | "UDP_SEGMENT" if uclibc => true, + // headers conflicts with linux/pidfd.h + "PIDFD_NONBLOCK" => true, + _ => false, } }); diff --git a/src/unix/linux_like/linux/gnu/mod.rs b/src/unix/linux_like/linux/gnu/mod.rs index f1d4a109164e6..d9e273ab62624 100644 --- a/src/unix/linux_like/linux/gnu/mod.rs +++ b/src/unix/linux_like/linux/gnu/mod.rs @@ -597,6 +597,7 @@ pub const RTLD_DI_TLS_MODID: ::c_int = 9; pub const RTLD_DI_TLS_DATA: ::c_int = 10; pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK; +pub const PIDFD_NONBLOCK: ::c_uint = O_NONBLOCK as ::c_uint; pub const SOL_RXRPC: ::c_int = 272; pub const SOL_PPPOL2TP: ::c_int = 273;