aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2022-12-02 15:44:59 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2022-12-02 23:38:07 +0000
commit7840793885c2b662b1fab22f23cf12da79806e76 (patch)
tree655cb19d07e9c3532c8ee47fb8f9f80f5de1ac78
parent06c46cd62a5a9c10b57eb0526c4fd475e6d01575 (diff)
downloadports-7840793885c2b662b1fab22f23cf12da79806e76.tar.gz
ports-7840793885c2b662b1fab22f23cf12da79806e76.zip
archivers/zstr: Patch build problems that users encounter
-rw-r--r--archivers/zstr/Makefile1
-rw-r--r--archivers/zstr/files/patch-src_strict__fstream.hpp13
2 files changed, 14 insertions, 0 deletions
diff --git a/archivers/zstr/Makefile b/archivers/zstr/Makefile
index 42ce94eec2a1..da85e6db034a 100644
--- a/archivers/zstr/Makefile
+++ b/archivers/zstr/Makefile
@@ -1,6 +1,7 @@
PORTNAME= zstr
DISTVERSIONPREFIX= v
DISTVERSION= 1.0.6-12
+PORTREVISION= 1
DISTVERSIONSUFFIX= -g85a5bd5
CATEGORIES= archivers devel
diff --git a/archivers/zstr/files/patch-src_strict__fstream.hpp b/archivers/zstr/files/patch-src_strict__fstream.hpp
new file mode 100644
index 000000000000..02e38142256f
--- /dev/null
+++ b/archivers/zstr/files/patch-src_strict__fstream.hpp
@@ -0,0 +1,13 @@
+- https://github.com/mateidavid/zstr/issues/60
+
+--- src/strict_fstream.hpp.orig 2022-12-02 20:40:17 UTC
++++ src/strict_fstream.hpp
+@@ -64,7 +64,7 @@ static std::string strerror()
+ } else {
+ return "Unknown error (" + std::to_string(err_num) + ")";
+ }
+-#elif ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__APPLE__)) && ! _GNU_SOURCE) || defined(__MUSL__)
++#elif ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__APPLE__) || defined(__FreeBSD__)) && ! _GNU_SOURCE) || defined(__MUSL__)
+ // XSI-compliant strerror_r()
+ const int err_num = errno; // See above
+ if (strerror_r(err_num, buff.data(), buff.size()) == 0) {