sys-fs/zfs: disable systemd on musl

Needed to fix build failures on musl (where we don't
have systemd anyway):
```
zfs-mount-generator.c: In function 'line_worker':
zfs-mount-generator.c:238:24: warning: implicit declaration of function 'strndupa'; did you mean 'strndup'? [-Wimplicit-function-declaration]
  238 |                 pool = strndupa(pool, toktmp - pool);
      |                        ^~~~~~~~
      |                        strndup
zfs-mount-generator.c:238:22: warning: assignment to 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  238 |                 pool = strndupa(pool, toktmp - pool);
      |                      ^
```

Reported-by: Jory A. Pratt <anarchy@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2021-09-22 02:17:19 +01:00
parent 11944e8d50
commit bb93f0a6fa
3 changed files with 12 additions and 2 deletions

View File

@@ -54,6 +54,10 @@ BDEPEND="virtual/awk
nls? ( sys-devel/gettext )
python? (
dev-python/setuptools[${PYTHON_USEDEP}]
|| (
dev-python/packaging[${PYTHON_USEDEP}]
dev-python/distlib[${PYTHON_USEDEP}]
)
)
"

View File

@@ -180,7 +180,6 @@ src_configure() {
local myconf=(
--bindir="${EPREFIX}/bin"
--enable-shared
--enable-systemd
--enable-sysvinit
--localstatedir="${EPREFIX}/var"
--sbindir="${EPREFIX}/sbin"
@@ -194,6 +193,10 @@ src_configure() {
--with-systemdunitdir="$(systemd_get_systemunitdir)"
--with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset"
--with-vendor=gentoo
# Building zfs-mount-generator.c on musl breaks as strndupa
# isn't available. But systemd doesn't support musl anyway, so
# just disable building it.
$(use_enable !elibc_musl systemd)
$(use_enable debug)
$(use_enable nls)
$(use_enable pam)

View File

@@ -182,7 +182,6 @@ src_configure() {
local myconf=(
--bindir="${EPREFIX}/bin"
--enable-shared
--enable-systemd
--enable-sysvinit
--localstatedir="${EPREFIX}/var"
--sbindir="${EPREFIX}/sbin"
@@ -196,6 +195,10 @@ src_configure() {
--with-systemdunitdir="$(systemd_get_systemunitdir)"
--with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset"
--with-vendor=gentoo
# Building zfs-mount-generator.c on musl breaks as strndupa
# isn't available. But systemd doesn't support musl anyway, so
# just disable building it.
$(use_enable !elibc_musl systemd)
$(use_enable debug)
$(use_enable nls)
$(use_enable pam)