]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libcommon: move pidfd-utils.c to Linux-only sources
authorKarel Zak <kzak@redhat.com>
Tue, 7 Apr 2026 12:46:06 +0000 (14:46 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 7 Apr 2026 12:46:06 +0000 (14:46 +0200)
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 <kzak@redhat.com>
lib/Makemodule.am
lib/meson.build

index 3fb664aaa1c04e6fd9498c70a9dc29fc4fb445cd..7626e76798d0e13ac202ee80469ca5d0c4ca57f5 100644 (file)
@@ -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
index c61054b9aff37541b125f13dfba27a5ed2510159..6b017f659b987a93885c1d804a7a4f7a6d152e19 100644 (file)
@@ -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