1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-22 18:55:29 +03:00
aports/testing/libthreadar/alpine_strerror_r.patch
Simon Rupf 2624d3d443 testing/libthreadar: new aport
http://libthreadar.sourceforge.net/
a C++ library that provides several classes to manipulate threads
2020-02-16 01:46:51 +01:00

19 lines
587 B
Diff

--- ./src/exceptions.cpp
+++ ./src/exceptions.cpp
@@ -59,16 +59,10 @@
const unsigned int MSGSIZE = 300;
char buffer[MSGSIZE];
-#if (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE
// we expect the XSI-compliant strerror_r
int val = strerror_r(error_code, buffer, MSGSIZE);
if(val != 0)
strncpy(buffer, "Error code to message conversion, failed", MSGSIZE);
-#else
- char *val = strerror_r(error_code, buffer, MSGSIZE);
- if(val != buffer)
- strncpy(buffer, val, MSGSIZE);
-#endif
buffer[MSGSIZE-1] = '\0';
reset_first_message(buffer);