Skip to content
Snippets Groups Projects
Commit a84e6048 authored by Jingyun Hua's avatar Jingyun Hua Committed by Natanael Copa
Browse files

community/tini: fix missing basename

parent bc049ae1
No related branches found
No related tags found
1 merge request!62810community/*: fix missing basename
Pipeline #221952 skipped
# Maintainer: Danilo Bürger <danilo@feastr.de> # Maintainer: Danilo Bürger <danilo@feastr.de>
pkgname=tini pkgname=tini
pkgver=0.19.0 pkgver=0.19.0
pkgrel=2 pkgrel=3
pkgdesc="A tiny but valid init for containers" pkgdesc="A tiny but valid init for containers"
options="!check" # Test suite depends on Docker options="!check" # Test suite depends on Docker
url="https://github.com/krallin/tini" url="https://github.com/krallin/tini"
...@@ -9,7 +9,8 @@ arch="all" ...@@ -9,7 +9,8 @@ arch="all"
license="MIT" license="MIT"
makedepends="cmake samurai" makedepends="cmake samurai"
subpackages="$pkgname-static" 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() { build() {
export CFLAGS="$CFLAGS -DPR_SET_CHILD_SUBREAPER=36 -DPR_GET_CHILD_SUBREAPER=37" export CFLAGS="$CFLAGS -DPR_SET_CHILD_SUBREAPER=36 -DPR_GET_CHILD_SUBREAPER=37"
...@@ -31,4 +32,5 @@ static() { ...@@ -31,4 +32,5 @@ static() {
sha512sums=" sha512sums="
1fa85b56e2c6085ea474f251928e7a40510d92aeef60b3c145b0496969c1b5df86835d143cb91ef5b4bf4da63fa8a56947cc39a4276e4b72faa57276d432b292 tini-0.19.0.tar.gz 1fa85b56e2c6085ea474f251928e7a40510d92aeef60b3c145b0496969c1b5df86835d143cb91ef5b4bf4da63fa8a56947cc39a4276e4b72faa57276d432b292 tini-0.19.0.tar.gz
69eef3220544f0447f05f4658616a42129ca67d0c89d051602e8fcd2003db639062cab2a4d277583d61558bba3834b47f4b5aa6796d24f308b9ccadf0df7fe41 fix-missing-basename.patch
" "
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"); }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment