bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch: SockExcpetion getSystemErrorString() method gives unexpected resu


From: Richard Hacker
Subject: Patch: SockExcpetion getSystemErrorString() method gives unexpected result
Date: Fri, 16 Dec 2011 13:34:07 +0100
User-agent: KMail/1.12.4 (Linux/2.6.31.12-0.2-desktop; KDE/4.3.5; x86_64; ; )

Hi,

here is a patch for the above issue. I hope someone picks this up and includes 
it.

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
--- commoncpp2-1.3.8/src/exception.cpp.orig     2011-12-16 12:22:42.000000000 
+0100
+++ commoncpp2-1.3.8/src/exception.cpp  2011-12-16 12:25:29.000000000 +0100
@@ -85,8 +85,13 @@
        if ( !_systemErrorString )
                _systemErrorString = new char[errStrSize];
 #ifndef WIN32
+#if (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) \
+        && ! _GNU_SOURCE
        strerror_r(_systemError, _systemErrorString, errStrSize);
        return _systemErrorString;
+#else
+       return strerror_r(_systemError, _systemErrorString, errStrSize);
+#endif
 
 #else
        FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM, NULL, _systemError,
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Mit freundlichem Gruß

Richard Hacker

-- 
------------------------------------------------------------------------

Richard Hacker M.Sc. 
address@hidden
Tel.: +49 201 / 36014-16

Ingenieurgemeinschaft IgH
Gesellschaft für Ingenieurleistungen mbH
Heinz-Bäcker-Str. 34
D-45356 Essen
Amtsgericht Essen HRB 11500
USt-Id.-Nr.: DE 174 626 722
Geschäftsführung: 
- Dr.-Ing. S. Rotthäuser, 
- Dr.-Ing. T. Finke, 
- Dr.-Ing. W. Hagemeister
Tel.: +49 201 / 360-14-0
http://www.igh-essen.com

------------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]