diff --git a/community/tini/APKBUILD b/community/tini/APKBUILD
index 085df231cf94e9df42901ee69676237c26ebe810..ae3bf40a6050b0871af58a636a37732e04abaa88 100644
--- a/community/tini/APKBUILD
+++ b/community/tini/APKBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Danilo Bürger <danilo@feastr.de>
 pkgname=tini
 pkgver=0.19.0
-pkgrel=2
+pkgrel=3
 pkgdesc="A tiny but valid init for containers"
 options="!check" # Test suite depends on Docker
 url="https://github.com/krallin/tini"
@@ -9,7 +9,8 @@ arch="all"
 license="MIT"
 makedepends="cmake samurai"
 subpackages="$pkgname-static"
-source="$pkgname-$pkgver.tar.gz::https://github.com/krallin/tini/archive/v$pkgver.tar.gz"
+source="$pkgname-$pkgver.tar.gz::https://github.com/krallin/tini/archive/v$pkgver.tar.gz
+	fix-missing-basename.patch"
 
 build() {
 	export CFLAGS="$CFLAGS -DPR_SET_CHILD_SUBREAPER=36 -DPR_GET_CHILD_SUBREAPER=37"
@@ -31,4 +32,5 @@ static() {
 
 sha512sums="
 1fa85b56e2c6085ea474f251928e7a40510d92aeef60b3c145b0496969c1b5df86835d143cb91ef5b4bf4da63fa8a56947cc39a4276e4b72faa57276d432b292  tini-0.19.0.tar.gz
+69eef3220544f0447f05f4658616a42129ca67d0c89d051602e8fcd2003db639062cab2a4d277583d61558bba3834b47f4b5aa6796d24f308b9ccadf0df7fe41  fix-missing-basename.patch
 "
diff --git a/community/tini/fix-missing-basename.patch b/community/tini/fix-missing-basename.patch
new file mode 100644
index 0000000000000000000000000000000000000000..69808d773de9d808fae8d0d7aa58e1739727c25a
--- /dev/null
+++ b/community/tini/fix-missing-basename.patch
@@ -0,0 +1,13 @@
+diff --git a/src/tini.c b/src/tini.c
+index eb62015..0e7d5da 100644
+--- a/src/tini.c
++++ b/src/tini.c
+@@ -18,6 +18,8 @@
+ #include "tiniConfig.h"
+ #include "tiniLicense.h"
+ 
++#define basename(name) (strrchr((name),'/') ? strrchr((name),'/')+1 : (name))
++
+ #if TINI_MINIMAL
+ #define PRINT_FATAL(...)                         fprintf(stderr, __VA_ARGS__); fprintf(stderr, "\n");
+ #define PRINT_WARNING(...)  if (verbosity > 0) { fprintf(stderr, __VA_ARGS__); fprintf(stderr, "\n"); }