diff --git a/main/musl/APKBUILD b/main/musl/APKBUILD
index 5d334325a31b8e14ccec7f25fbc29b46c8e36e2e..a55f6657a4d663b88d5abe4f59371a1e1137b2f4 100644
--- a/main/musl/APKBUILD
+++ b/main/musl/APKBUILD
@@ -5,7 +5,7 @@ pkgver=0.9.13
 pkgrel=0
 pkgdesc="the musl c library (libc) implementation"
 url="http://www.musl-libc.org/"
-arch="x86 x86_64 arm armel"
+arch="all"
 license="MIT"
 depends=""
 depends_dev=""
@@ -33,8 +33,21 @@ prepare() {
 	cp "$srcdir"/getopt_long.c src/misc/
 }
 
+install_sysroot_headers() {
+	cd "$_builddir"
+	if [ -z "${CBUILDROOT}" ]; then
+		echo "CBUILDROOT not must be set!"
+		return 1
+	fi
+	case "$CARCH" in
+	arm*) ARCH="arm" ;;
+	x86) ARCH="i386" ;;
+	x86_64) ARCH="x86_64" ;;
+	esac
+	make ARCH="$ARCH" DESTDIR="${CBUILDROOT}" install-headers || return 1
+}
+
 build() {
-	local _ldflags
 	cd "$_builddir"
 	# note: not autotools
 	LDFLAGS="$LDFLAGS -Wl,-soname,libc.musl-${CARCH}.so.1" \