[PATCH 1/9] linux: Add C++ and multiple inclusion guards to sys/pidfd.h (BZ 34752)

Carlos O'Donell carlos@redhat.com
Mon Nov 2 16:55:10 GMT 2026


On 10/21/26 9:54 AM, Adhemerval Zanella wrote:
> Checked on aarch64-linux-gnu.

LGTM.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

> ---
>   sysdeps/unix/sysv/linux/sys/pidfd.h | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/sysdeps/unix/sysv/linux/sys/pidfd.h b/sysdeps/unix/sysv/linux/sys/pidfd.h
> index 93c7defcac3..e6c22d61c03 100644
> --- a/sysdeps/unix/sysv/linux/sys/pidfd.h
> +++ b/sysdeps/unix/sysv/linux/sys/pidfd.h
> @@ -17,6 +17,7 @@
>      <https://www.gnu.org/licenses/>.  */
>   
>   #ifndef _PIDFD_H
> +#define _PIDFD_H 1
>   
>   #include <fcntl.h>
>   #include <bits/types/siginfo_t.h>
> @@ -115,6 +116,8 @@ struct pidfd_info
>   
>   #define PIDFD_GET_INFO                        _IOWR(PIDFS_IOCTL_MAGIC, 11, struct pidfd_info)
>   
> +__BEGIN_DECLS
> +
>   /* Returns a file descriptor that refers to the process PID.  The
>      close-on-exec is set on the file descriptor.  */
>   extern int pidfd_open (__pid_t __pid, unsigned int __flags) __THROW;
> @@ -136,4 +139,6 @@ extern int pidfd_send_signal (int __pidfd, int __sig, siginfo_t *__info,
>      or -1 in case of an error.  */
>   extern pid_t pidfd_getpid (int __fd) __THROW;
>   
> +__END_DECLS
> +
>   #endif /* _PIDFD_H  */


-- 
Cheers,
Carlos.



More information about the Libc-alpha mailing list