summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2019-12-01 20:49:23 -0800
committerRosen Penev <rosenp@gmail.com>2019-12-01 20:52:04 -0800
commit54266c99b2a2e37a4c01b02ae74346874db7003c (patch)
tree39a3c37bd82f6eaaebb06d2a6d19b7ddf6eaa0d3
parent1d434b00e70958e22449f876f0155f5986ef39c5 (diff)
zstd: Fix compilation with uClibc-ng
Upstream backports. Signed-off-by: Rosen Penev <rosenp@gmail.com>
-rw-r--r--utils/zstd/Makefile2
-rw-r--r--utils/zstd/patches/010-mtime.patch23
-rw-r--r--utils/zstd/patches/020-util.patch22
3 files changed, 46 insertions, 1 deletions
diff --git a/utils/zstd/Makefile b/utils/zstd/Makefile
index 54f62942b..480334ee1 100644
--- a/utils/zstd/Makefile
+++ b/utils/zstd/Makefile
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=zstd
PKG_VERSION:=1.4.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/facebook/zstd/tar.gz/v$(PKG_VERSION)?
diff --git a/utils/zstd/patches/010-mtime.patch b/utils/zstd/patches/010-mtime.patch
new file mode 100644
index 000000000..10ad8612c
--- /dev/null
+++ b/utils/zstd/patches/010-mtime.patch
@@ -0,0 +1,23 @@
+From f62cf1fff5dabcfaaa8c85638723bc19842f52f4 Mon Sep 17 00:00:00 2001
+From: Sergey Dryabzhinsky <sergey.dryabzhinsky+github@gmail.com>
+Date: Tue, 19 Nov 2019 23:15:28 +0300
+Subject: [PATCH] Fix typo in util.c
+
+There must be mtim*e*
+---
+ programs/util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/programs/util.c b/programs/util.c
+index 5d15450d2..d3ffc1133 100644
+--- a/programs/util.c
++++ b/programs/util.c
+@@ -73,7 +73,7 @@ int UTIL_setFileStat(const char *filename, stat_t *statbuf)
+ {
+ /* (atime, mtime) */
+ struct timespec timebuf[2] = { {0, UTIME_NOW} };
+- timebuf[1] = statbuf->st_mtim;
++ timebuf[1] = statbuf->st_mtime;
+ res += utimensat(AT_FDCWD, filename, timebuf, 0);
+ }
+ #endif
diff --git a/utils/zstd/patches/020-util.patch b/utils/zstd/patches/020-util.patch
new file mode 100644
index 000000000..74f652e2d
--- /dev/null
+++ b/utils/zstd/patches/020-util.patch
@@ -0,0 +1,22 @@
+From 612a06eb3ef7f42739ace99fbca6ad63b788d46c Mon Sep 17 00:00:00 2001
+From: Sergey Dryabzhinsky <sergey.dryabzhinsky+github@gmail.com>
+Date: Tue, 19 Nov 2019 23:24:00 +0300
+Subject: [PATCH] Update util.c
+
+---
+ programs/util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/programs/util.c b/programs/util.c
+index d3ffc1133..aa75ca6d4 100644
+--- a/programs/util.c
++++ b/programs/util.c
+@@ -73,7 +73,7 @@ int UTIL_setFileStat(const char *filename, stat_t *statbuf)
+ {
+ /* (atime, mtime) */
+ struct timespec timebuf[2] = { {0, UTIME_NOW} };
+- timebuf[1] = statbuf->st_mtime;
++ timebuf[1].tv_sec = statbuf->st_mtime;
+ res += utimensat(AT_FDCWD, filename, timebuf, 0);
+ }
+ #endif