30 lines
900 B
Diff
30 lines
900 B
Diff
|
From: Jan Engelhardt <jengelh@medozas.de>
|
||
|
Date: 2011-11-10 12:19:12.730015880 +0100
|
||
|
Upstream: tbd
|
||
|
|
||
|
When GNU_SOURCE is defined -- which happens to be the case in the
|
||
|
default G++ environment -- strerror_r behaves differently: it may
|
||
|
not actually fill in the buffer if there is no need to. The error
|
||
|
string pointer is returned in any case.
|
||
|
|
||
|
---
|
||
|
gsoap/stdsoap2.cpp | 4 ++++
|
||
|
1 file changed, 4 insertions(+)
|
||
|
|
||
|
Index: gsoap-2.8.4/gsoap/stdsoap2.cpp
|
||
|
===================================================================
|
||
|
--- gsoap-2.8.4.orig/gsoap/stdsoap2.cpp
|
||
|
+++ gsoap-2.8.4/gsoap/stdsoap2.cpp
|
||
|
@@ -15905,7 +15905,11 @@ soap_strerror(struct soap *soap)
|
||
|
{
|
||
|
#ifndef WIN32
|
||
|
# ifdef HAVE_STRERROR_R
|
||
|
+# ifdef _GNU_SOURCE
|
||
|
+ return strerror_r(err, soap->msgbuf, sizeof(soap->msgbuf));
|
||
|
+# else
|
||
|
strerror_r(err, soap->msgbuf, sizeof(soap->msgbuf));
|
||
|
+# endif
|
||
|
# else
|
||
|
return strerror(err);
|
||
|
# endif
|