]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: move shells.c to common (non-Linux) sources
authorKarel Zak <kzak@redhat.com>
Tue, 3 Mar 2026 10:41:50 +0000 (11:41 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 3 Mar 2026 10:41:50 +0000 (11:41 +0100)
shells.c uses POSIX setusershell()/getusershell()/endusershell()
which are available on non-Linux systems (e.g., GNU/Hurd). Move it
from the Linux-only section to common libcommon sources.

The meson build already had shells.c in common sources, so only
the autotools build needed fixing.

Co-authored-by: Samuel Thibault <samuel.thibault@aquilenet.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
lib/Makemodule.am

index a8542af5b5bc4ee9257190919c1d5b80ee5326d0..5a2e9a9074c89e7a013796b50a74dfd25bbc8464 100644 (file)
@@ -37,6 +37,7 @@ libcommon_la_SOURCES = \
        lib/randutils.c \
        lib/sha1.c \
        lib/sha256.c \
+       lib/shells.c \
        lib/signames.c \
        lib/strutils.c \
        lib/strv.c \
@@ -48,7 +49,6 @@ libcommon_la_SOURCES = \
 if LINUX
 libcommon_la_SOURCES += \
        lib/linux_version.c \
-       lib/shells.c \
        lib/loopdev.c
 endif