From b6ef17666df708d5251bcb8b75babe2cce54c956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Sun, 12 May 2024 11:37:55 +0200 Subject: [PATCH] main/testdisk: fix implicit basename declaration See #16103 --- main/testdisk/APKBUILD | 6 ++++-- .../implicit-basename-declaration.patch | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 main/testdisk/implicit-basename-declaration.patch diff --git a/main/testdisk/APKBUILD b/main/testdisk/APKBUILD index 318d584b170..f7a7c1073a3 100644 --- a/main/testdisk/APKBUILD +++ b/main/testdisk/APKBUILD @@ -1,14 +1,15 @@ # Maintainer: Leonardo Arena pkgname=testdisk pkgver=7.2 -pkgrel=0 +pkgrel=1 pkgdesc="A data recovery suite" url="https://www.cgsecurity.org/wiki/TestDisk" arch="all" license="GPL-2.0-or-later" makedepends="e2fsprogs-dev ntfs-3g-dev ncurses-dev zlib-dev libjpeg-turbo-dev" subpackages="$pkgname-doc" -source="https://www.cgsecurity.org/testdisk-$pkgver.tar.bz2" +source="https://www.cgsecurity.org/testdisk-$pkgver.tar.bz2 + implicit-basename-declaration.patch" build() { ./configure \ @@ -31,4 +32,5 @@ package() { sha512sums=" f99dd1c8f547c3d06e5459ba072438192a49d76c569de7915994beb269645092522d8136a212999382f88ca1d29c50f6482306d47197dc0994d168bcd4141f26 testdisk-7.2.tar.bz2 +2d446e5eaf43aefda334b16e0f1fec4f77e4dd44ddb14f3db0e94485b28da827215a813f36946eed768881abcc616c3aca6c767a95c596fcbcc8143f51f94237 implicit-basename-declaration.patch " diff --git a/main/testdisk/implicit-basename-declaration.patch b/main/testdisk/implicit-basename-declaration.patch new file mode 100644 index 00000000000..a3102572697 --- /dev/null +++ b/main/testdisk/implicit-basename-declaration.patch @@ -0,0 +1,17 @@ +POSIX requires libgen.h to be included for the basename function prototype. + +See https://gitlab.alpinelinux.org/alpine/aports/-/issues/16103 + +diff -upr testdisk-7.2.orig/src/hdaccess.c testdisk-7.2/src/hdaccess.c +--- testdisk-7.2.orig/src/hdaccess.c 2024-05-12 11:35:59.137491246 +0200 ++++ testdisk-7.2/src/hdaccess.c 2024-05-12 11:36:51.334218946 +0200 +@@ -48,6 +48,9 @@ + #ifdef HAVE_STRING_H + #include + #endif ++#ifdef HAVE_LIBGEN_H ++#include ++#endif + #ifdef HAVE_FCNTL_H + #include /* open */ + #endif