[LTP] [PATCH 1/2] Add configure check for sys/pidfd.h

Li Wang [email protected]
Tue Aug 16 08:02:16 CEST 2022


Hi Khem,

Did you fetch the latest branch of LTP? if not, can you try with that?

I guess this was duplicated with another fix(merged).
https://github.com/linux-test-project/ltp/commit/dbc9c14c92a5acf450d07868a735ac8cd6ec5b90

and patch2/2 similar to:
https://github.com/linux-test-project/ltp/commit/b857f8723f30a4b9554bf6b0ff8fa52fd07e8b60


On Tue, Aug 16, 2022 at 1:16 PM Khem Raj <[email protected]> wrote:

> Use it to include newly added sys/pidfd.h in glibc 2.36+
>
> Signed-off-by: Khem Raj <[email protected]>
> ---
>  configure.ac         | 1 +
>  include/lapi/pidfd.h | 4 ++++
>  2 files changed, 5 insertions(+)
>
> diff --git a/configure.ac b/configure.ac
> index 81cba98c2..a0123f166 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -71,6 +71,7 @@ AC_CHECK_HEADERS_ONCE([ \
>      sys/epoll.h \
>      sys/fanotify.h \
>      sys/inotify.h \
> +    sys/pidfd.h \
>      sys/prctl.h \
>      sys/shm.h \
>      sys/timerfd.h \
> diff --git a/include/lapi/pidfd.h b/include/lapi/pidfd.h
> index 244d3acaf..d29a2b274 100644
> --- a/include/lapi/pidfd.h
> +++ b/include/lapi/pidfd.h
> @@ -15,6 +15,10 @@
>  #define PIDFD_NONBLOCK O_NONBLOCK
>  #endif
>
> +#ifdef HAVE_SYS_PIDFD_H
> +#include <sys/pidfd.h>
> +#endif
> +
>  static inline void pidfd_send_signal_supported(void)
>  {
>         /* allow the tests to fail early */
> --
> 2.37.2
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
>
>

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20220816/4bf57f65/attachment-0001.htm>


More information about the ltp mailing list