diff options
author | Shiz <hi@shiz.me> | 2017-05-06 02:52:37 +0000 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-05-06 14:56:13 +0200 |
commit | 31f4e002d0f23414ec8d19a8f8656d2de01bbc20 (patch) | |
tree | 4dfce9491e6c99c91d667971eaebc9963e9bc39e /testing/bobcat/avoid-strerror_r.patch | |
parent | c01724f27449aabc93e5231f10bcba5a7e9b06f2 (diff) | |
download | aports-31f4e002d0f23414ec8d19a8f8656d2de01bbc20.tar.bz2 aports-31f4e002d0f23414ec8d19a8f8656d2de01bbc20.tar.xz |
testing/bobcat: new aport
https://fbb-git.github.io/bobcat/
library of C++ classes and templates handling child processes, streams/sockets,
shared memory, config files, etc.
Diffstat (limited to 'testing/bobcat/avoid-strerror_r.patch')
-rw-r--r-- | testing/bobcat/avoid-strerror_r.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/testing/bobcat/avoid-strerror_r.patch b/testing/bobcat/avoid-strerror_r.patch new file mode 100644 index 0000000000..73eea28215 --- /dev/null +++ b/testing/bobcat/avoid-strerror_r.patch @@ -0,0 +1,23 @@ +bobcat expects the GNU variant of strerror_r, while musl only provides the +XSI variant with incompatible return type, leading to a compilation error. +As musl strerror() is re-entrant anyway, just use that instead. +--- a/exception/errnodescr.cc ++++ b/exception/errnodescr.cc +@@ -7,16 +7,7 @@ + { + if (errno != 0) + { +- char *buffer = new char[Exception::STRERROR_BUFSIZE]; +- +- if (char *cp = strerror_r(errno, buffer, Exception::STRERROR_BUFSIZE)) +- out << cp; +- else +- { +- out << "internal error: strerror_r failed with errno = " << errno; +- } +- +- delete[] buffer; ++ out << strerror(errno); + } + + return out; |