mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-12 16:06:42 +02:00
https://fbb-git.github.io/bobcat/ library of C++ classes and templates handling child processes, streams/sockets, shared memory, config files, etc.
23 lines
694 B
Diff
23 lines
694 B
Diff
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;
|