diff --git a/main/apr/APKBUILD b/main/apr/APKBUILD
index ccf5138b2714de625d628968a9d7154a9c1bec3e..cd37593f02efe8ca72d2249c69d358f97919d86f 100644
--- a/main/apr/APKBUILD
+++ b/main/apr/APKBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
 pkgname=apr
 pkgver=1.6.3
-pkgrel=0
+pkgrel=1
 pkgdesc="The Apache Portable Runtime"
 url="http://apr.apache.org/"
 arch="all"
@@ -11,29 +11,29 @@ depends_dev="util-linux-dev bash"
 makedepends="$depends_dev"
 subpackages="$pkgname-dev"
 source="http://www.apache.org/dist/$pkgname/$pkgname-$pkgver.tar.bz2
+	apr-1.6.2-dont-test-dlclose.patch
 	"
 
-_builddir="$srcdir"/$pkgname-$pkgver
-prepare() {
-	cd "$_builddir"
-}
-
 build() {
-	cd "$_builddir"
+	cd "$builddir"
 	./configure \
 		--build=$CBUILD \
 		--host=$CHOST \
 		--prefix=/usr \
 		--datadir=/usr/share \
 		--enable-nonportable-atomics \
-		--with-devrandom=/dev/urandom \
-		|| return 1
-	make || return 1
+		--with-devrandom=/dev/urandom
+	make
+}
+
+check() {
+	cd "$builddir"
+	make check
 }
 
 package() {
-	cd "$_builddir"
-	make DESTDIR="$pkgdir" install || return 1
+	cd "$builddir"
+	make DESTDIR="$pkgdir" install
 }
 
 # basicly everything thats not a *.so* file belongs to the -dev package
@@ -48,4 +48,5 @@ dev() {
 	return 0
 }
 
-sha512sums="f6b8679ae7fafff793c825c78775c84a646267c441710a50664589850e13148719b4eab48ab6e7c95b7aed085cff831115687434a7b160dcc2faa0eae63ac996  apr-1.6.3.tar.bz2"
+sha512sums="f6b8679ae7fafff793c825c78775c84a646267c441710a50664589850e13148719b4eab48ab6e7c95b7aed085cff831115687434a7b160dcc2faa0eae63ac996  apr-1.6.3.tar.bz2
+9fb931e45f30fbe68af56849dfca148c09cdf85e300af14fb259cbd43470113288680bdb21189d4cf13f5ce95f8d28666822535e017e64ace5324339ab50cbef  apr-1.6.2-dont-test-dlclose.patch"
diff --git a/main/apr/apr-1.6.2-dont-test-dlclose.patch b/main/apr/apr-1.6.2-dont-test-dlclose.patch
new file mode 100644
index 0000000000000000000000000000000000000000..df242540426e8ed4d1779910773ea50f23e005ba
--- /dev/null
+++ b/main/apr/apr-1.6.2-dont-test-dlclose.patch
@@ -0,0 +1,22 @@
+dlclose is a no-op on musl.  Test will always fail.
+
+--- apr-1.6.2/test/testdso.c.old	2010-01-03 19:35:07.000000000 -0600
++++ apr-1.6.2/test/testdso.c	2017-09-10 18:43:43.374983090 -0500
+@@ -244,7 +244,7 @@
+     abts_run_test(suite, test_load_module, NULL);
+     abts_run_test(suite, test_dso_sym, NULL);
+     abts_run_test(suite, test_dso_sym_return_value, NULL);
+-    abts_run_test(suite, test_unload_module, NULL);
++    /* abts_run_test(suite, test_unload_module, NULL); */
+ 
+ #ifdef LIB_NAME
+     apr_filepath_merge(&libname, NULL, LIB_NAME, 0, p);
+@@ -252,7 +252,7 @@
+     abts_run_test(suite, test_load_library, NULL);
+     abts_run_test(suite, test_dso_sym_library, NULL);
+     abts_run_test(suite, test_dso_sym_return_value_library, NULL);
+-    abts_run_test(suite, test_unload_library, NULL);
++    /* abts_run_test(suite, test_unload_library, NULL); */
+ #endif
+ 
+     abts_run_test(suite, test_load_notthere, NULL);