aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libthreadar/alpine_strerror_r.patch
blob: fe26c895bbb26edb8b13708b350a97b2166d43b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- ./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);