summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstefson <herrtimson@yahoo.de>2020-09-27 10:26:54 +0200
committerSam James <sam@gentoo.org>2020-10-06 13:53:59 +0000
commit140cb6ad1f0a8d8217453aa2ccb16e00d5a02c0a (patch)
treee556edf2b0cd5885511eeeaf8aa8d7c5a90ee3f1 /app-arch
parentdev-libs/serd: Stabilize 0.30.4 arm, #744769 (diff)
downloadgentoo-140cb6ad1f0a8d8217453aa2ccb16e00d5a02c0a.tar.gz
gentoo-140cb6ad1f0a8d8217453aa2ccb16e00d5a02c0a.tar.bz2
gentoo-140cb6ad1f0a8d8217453aa2ccb16e00d5a02c0a.zip
app-arch/zstd: fix compile with uclibc
Closes: https://bugs.gentoo.org/741972 Signed-off-by: Steffen Kuhn <nielson2@yandex.com> Closes: https://github.com/gentoo/gentoo/pull/17691 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-arch')
-rw-r--r--app-arch/zstd/files/zstd-1.4.5-fix-uclibc-ng.patch28
-rw-r--r--app-arch/zstd/zstd-1.4.4-r4.ebuild1
-rw-r--r--app-arch/zstd/zstd-1.4.5.ebuild4
3 files changed, 33 insertions, 0 deletions
diff --git a/app-arch/zstd/files/zstd-1.4.5-fix-uclibc-ng.patch b/app-arch/zstd/files/zstd-1.4.5-fix-uclibc-ng.patch
new file mode 100644
index 00000000000..e4c2335d199
--- /dev/null
+++ b/app-arch/zstd/files/zstd-1.4.5-fix-uclibc-ng.patch
@@ -0,0 +1,28 @@
+From 1dcc4787965aa8f4af48ed5a2154185750bbaff5 Mon Sep 17 00:00:00 2001
+From: Yann Collet <cyan@fb.com>
+Date: Mon, 13 Jul 2020 14:16:33 -0700
+Subject: [PATCH] fix uclibc's st_mtim
+
+reported and suggested by @ewildgoose (#1872)
+---
+ programs/platform.h | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/programs/platform.h b/programs/platform.h
+index 2b4b9f2d8..68be70bb3 100644
+--- a/programs/platform.h
++++ b/programs/platform.h
+@@ -102,6 +102,12 @@ extern "C" {
+ # define PLATFORM_POSIX_VERSION 1
+ # endif
+
++# ifdef __UCLIBC__
++# ifndef __USE_MISC
++# define __USE_MISC /* enable st_mtim on uclibc */
++# endif
++# endif
++
+ # else /* non-unix target platform (like Windows) */
+ # define PLATFORM_POSIX_VERSION 0
+ # endif
+
diff --git a/app-arch/zstd/zstd-1.4.4-r4.ebuild b/app-arch/zstd/zstd-1.4.4-r4.ebuild
index 8c6ab8a0fd5..ebb7e04a9cc 100644
--- a/app-arch/zstd/zstd-1.4.4-r4.ebuild
+++ b/app-arch/zstd/zstd-1.4.4-r4.ebuild
@@ -21,6 +21,7 @@ DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}/${P}-pkgconfig_libdir.patch" #700780
"${FILESDIR}/${P}-make43.patch" #708110
+ "${FILESDIR}/${PN}-1.4.5-fix-uclibc-ng.patch" #741972
)
src_prepare() {
diff --git a/app-arch/zstd/zstd-1.4.5.ebuild b/app-arch/zstd/zstd-1.4.5.ebuild
index 414788bac8f..110b0378b77 100644
--- a/app-arch/zstd/zstd-1.4.5.ebuild
+++ b/app-arch/zstd/zstd-1.4.5.ebuild
@@ -18,6 +18,10 @@ RDEPEND="app-arch/xz-utils
lz4? ( app-arch/lz4 )"
DEPEND="${RDEPEND}"
+PATCHES=(
+ "${FILESDIR}/${P}-fix-uclibc-ng.patch" #741972
+)
+
src_prepare() {
default
multilib_copy_sources