1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-09 06:51:44 +00:00

archivers/zstr: Patch build problems that users encounter

This commit is contained in:
Yuri Victorovich 2022-12-02 07:44:59 -08:00
parent 06c46cd62a
commit 7840793885
2 changed files with 14 additions and 0 deletions

View File

@ -1,6 +1,7 @@
PORTNAME= zstr
DISTVERSIONPREFIX= v
DISTVERSION= 1.0.6-12
PORTREVISION= 1
DISTVERSIONSUFFIX= -g85a5bd5
CATEGORIES= archivers devel

View File

@ -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) {