]> git.ipfire.org Git - thirdparty/util-linux.git/commit
check for sys/pidfd.h
authorKhem Raj <raj.khem@gmail.com>
Sun, 7 Aug 2022 21:39:19 +0000 (14:39 -0700)
committerKhem Raj <raj.khem@gmail.com>
Sun, 7 Aug 2022 21:51:01 +0000 (14:51 -0700)
commit84732a8849a08d42a9a95dcbee9005116be78eb8
tree70d4cf26a3529bb574dec2f7e0ff7ca7d380c7c1
parent8ac75e31de0ece74515e98e0b22e54cc0a9808bd
check for sys/pidfd.h

This header in newer glibc defines the signatures of functions
pidfd_send_signal() and pidfd_open() and when these functions are
defined by libc then we need to include the relevant header to get
the definitions. Clang 15+ has started to error out when function
signatures are missing.

Fixes errors like
misc-utils/kill.c:402:6: error: call to undeclared function 'pidfd_send_signal'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        if (pidfd_send_signal(pfd, ctl->numsig, &info, 0) < 0)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
configure.ac
include/pidfd-utils.h