caputils.c is GPL-licensed, and libcommon should only contain LGPL
or public domain code (as stated in lib/Makemodule.am). Move it out
of lib_common_sources and add it directly to the sources of binaries
that use it (unshare, nsenter, setpriv), matching autotools.
Addresses: https://github.com/util-linux/util-linux/issues/4085
Signed-off-by: Karel Zak <kzak@redhat.com>
)
selinux_utils_c = files('selinux-utils.c')
+caputils_c = files('caputils.c')
+
if LINUX
lib_common_sources += '''
- caputils.c
linux_version.c
loopdev.c
'''.split()
unshare_sources = files(
'unshare.c',
) + \
+ caputils_c + \
exec_shell_c
unshare_manadocs = files('unshare.1.adoc')
nsenter_sources = files(
'nsenter.c',
) + \
+ caputils_c + \
exec_shell_c
nsenter_manadocs = files('nsenter.1.adoc')
setpriv_sources = files(
'setpriv.c',
-)
+) + \
+ caputils_c
if LINUX and conf.get('HAVE_LINUX_LANDLOCK_H').to_string() == '1'
setpriv_sources += files('setpriv-landlock.c')
endif