From: Karel Zak Date: Tue, 7 Apr 2026 12:46:06 +0000 (+0200) Subject: libcommon: move pidfd-utils.c to Linux-only sources X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afdade4a3d8e4e6070343c5576470c575719b81f;p=thirdparty%2Futil-linux.git libcommon: move pidfd-utils.c to Linux-only sources The pidfd-utils.c uses Linux-specific APIs (pidfd_open, statx, etc.) and all its consumers are Linux-only tools. Move it under the LINUX guard in both meson and autotools build systems. Signed-off-by: Karel Zak --- diff --git a/lib/Makemodule.am b/lib/Makemodule.am index 3fb664aaa..7626e7679 100644 --- a/lib/Makemodule.am +++ b/lib/Makemodule.am @@ -33,7 +33,6 @@ libcommon_la_SOURCES = \ lib/mbsedit.c\ lib/md5.c \ lib/pidutils.c \ - lib/pidfd-utils.c \ lib/pwdutils.c \ lib/randutils.c \ lib/sha1.c \ @@ -50,7 +49,8 @@ libcommon_la_SOURCES = \ if LINUX libcommon_la_SOURCES += \ lib/linux_version.c \ - lib/loopdev.c + lib/loopdev.c \ + lib/pidfd-utils.c endif if !HAVE_LANGINFO_H diff --git a/lib/meson.build b/lib/meson.build index c61054b9a..6b017f659 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -17,7 +17,6 @@ lib_common_sources = ''' mbsalign.c mbsedit.c pidutils.c - pidfd-utils.c pwdutils.c sha256.c shells.c @@ -65,6 +64,7 @@ if LINUX lib_common_sources += ''' linux_version.c loopdev.c + pidfd-utils.c '''.split() endif