Fix cross-compilation issues when using GCC-12.3
I have been using buildroot to build procps-ng with the following ARM toolchain: https://developer.arm.com/-/media/Files/downloads/gnu/12.3.rel1/binrel/arm-gnu-toolchain-12.3.rel1-x86_64-aarch64-none-linux-gnu.tar.xz
Three different issues have come up, and this MR contains my fixes for them.
-
configurefails to detect that the sysroot does support thepidfd_opensyscall wrapper - once that issue is solved, it fails to define
HAVE_PIDFD_OPENwhich is used here inpgrep.c, so it fails building, because__NR_pidfd_openis then undefined - When building for systemd, w.c depends on
libsystemd, but the configure step does not add it itsLDADD, so the linker step fails with undefined references
Edited by oli-ben