aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libthreadar/alpine_strerror_r.patch
diff options
context:
space:
mode:
authorSimon Rupf <simon@rupf.net>2020-02-14 07:03:35 +0100
committerRasmus Thomsen <oss@cogitri.dev>2020-02-16 01:46:51 +0100
commit2624d3d443becadd096f46105ffc46ce83a3ae9e (patch)
tree424f99d8680785ef3161d4bfabad02d415ecd262 /testing/libthreadar/alpine_strerror_r.patch
parenta188ba22708c1000fb191da2b41c7622b573be60 (diff)
downloadaports-2624d3d443becadd096f46105ffc46ce83a3ae9e.tar.bz2
aports-2624d3d443becadd096f46105ffc46ce83a3ae9e.tar.xz
testing/libthreadar: new aport
http://libthreadar.sourceforge.net/ a C++ library that provides several classes to manipulate threads
Diffstat (limited to 'testing/libthreadar/alpine_strerror_r.patch')
-rw-r--r--testing/libthreadar/alpine_strerror_r.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/testing/libthreadar/alpine_strerror_r.patch b/testing/libthreadar/alpine_strerror_r.patch
new file mode 100644
index 0000000000..fe26c895bb
--- /dev/null
+++ b/testing/libthreadar/alpine_strerror_r.patch
@@ -0,0 +1,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);