commit:     80b4f200f02a30f1f1e43e929deda4f525462bed
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue May 14 17:17:30 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue May 14 17:17:30 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80b4f200

app-admin/testdisk: Backport a musl build fix

Closes: https://bugs.gentoo.org/931887
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 app-admin/testdisk/files/testdisk-7.2-musl.patch | 25 ++++++++++++++++++++++++
 app-admin/testdisk/testdisk-7.2.ebuild           |  2 ++
 2 files changed, 27 insertions(+)

diff --git a/app-admin/testdisk/files/testdisk-7.2-musl.patch 
b/app-admin/testdisk/files/testdisk-7.2-musl.patch
new file mode 100644
index 000000000000..d01c2797bf28
--- /dev/null
+++ b/app-admin/testdisk/files/testdisk-7.2-musl.patch
@@ -0,0 +1,25 @@
+From 2c6780ca1edd0b0ba2e5e86b12634e3cc8475872 Mon Sep 17 00:00:00 2001
+From: Christophe Grenier <gren...@cgsecurity.org>
+Date: Tue, 14 May 2024 17:34:56 +0200
+Subject: [PATCH] src/hdaccess.c: Fix build with musl-1.2.5 See
+ https://github.com/cgsecurity/testdisk/issues/154
+ https://bugs.gentoo.org/931887
+
+---
+ src/hdaccess.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/hdaccess.c b/src/hdaccess.c
+index 91ec7915..9768c07c 100644
+--- a/src/hdaccess.c
++++ b/src/hdaccess.c
+@@ -109,6 +109,9 @@
+ #ifdef HAVE_GLOB_H
+ #include <glob.h>
+ #endif
++#ifdef HAVE_LIBGEN_H
++#include <libgen.h>
++#endif
+ 
+ #if defined(__CYGWIN__) || defined(__MINGW32__)
+ #include "win32.h"

diff --git a/app-admin/testdisk/testdisk-7.2.ebuild 
b/app-admin/testdisk/testdisk-7.2.ebuild
index ea419d0652ee..cfc23c0f8bc4 100644
--- a/app-admin/testdisk/testdisk-7.2.ebuild
+++ b/app-admin/testdisk/testdisk-7.2.ebuild
@@ -60,6 +60,8 @@ BDEPEND="gui? ( dev-qt/linguist-tools:5 )"
 DOCS=()
 
 PATCHES=(
+       # 
https://github.com/cgsecurity/testdisk/commit/2c6780ca1edd0b0ba2e5e86b12634e3cc8475872
+       "${FILESDIR}/${P}-musl.patch"
 )
 
 src_configure() {

Reply via email to