mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-22 18:55:29 +03:00
http://libthreadar.sourceforge.net/ a C++ library that provides several classes to manipulate threads
19 lines
587 B
Diff
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);
|