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.

  • configure fails to detect that the sysroot does support the pidfd_open syscall wrapper
  • once that issue is solved, it fails to define HAVE_PIDFD_OPEN which is used here in pgrep.c, so it fails building, because __NR_pidfd_open is then undefined
  • When building for systemd, w.c depends on libsystemd, but the configure step does not add it its LDADD, so the linker step fails with undefined references
Edited by oli-ben

Merge request reports

Loading