From bca41ae70ccec476f37d765b5bbe69ac66f7c2fa Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 2 Nov 2015 17:13:11 +0100 Subject: [PATCH] util-linux: fix switch_root(8) with musl. glibc declares some defs internally for struct dirent, _DIRENT_HAVE_D_TYPE one of them. switch_root(8) expects this to be defined to properly remove all subdirs stored in current root before switching. This fixes those annoying warnings seen with musl on the initramfs. --- srcpkgs/util-linux/template | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/srcpkgs/util-linux/template b/srcpkgs/util-linux/template index 3fe02bd1d80..55972bd3ffd 100644 --- a/srcpkgs/util-linux/template +++ b/srcpkgs/util-linux/template @@ -1,7 +1,7 @@ # Template file for 'util-linux' pkgname=util-linux version=2.27 -revision=1 +revision=2 short_desc="Miscellaneous linux utilities" maintainer="Juan RP " homepage="https://www.kernel.org/pub/linux/utils/util-linux/" @@ -23,6 +23,9 @@ conf_files=" /etc/pam.d/login" provides="eject-${version}_1" +# XXX musl needs this for switch_root(8). +CFLAGS="-D_DIRENT_HAVE_D_TYPE" + pre_configure() { NOCONFIGURE=1 ./autogen.sh }