diff --git a/ChangeLog b/ChangeLog index e57e4c683..ebfd2e975 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-07-03 Richard Frith-Macdonald + + * Source/Addictions/NSError+GNUstepBase.m: + Declare _XOPEN_SOURCE so that glibc gives us the correct version of + the strerror_r function. + 2010-01-07 Niels Grewe * Source/GNUmakefile diff --git a/Source/Additions/NSError+GNUstepBase.m b/Source/Additions/NSError+GNUstepBase.m index a95563533..cdfa6e0a4 100644 --- a/Source/Additions/NSError+GNUstepBase.m +++ b/Source/Additions/NSError+GNUstepBase.m @@ -22,6 +22,15 @@ Boston, MA 02111 USA. */ + +/* We must define _XOPEN_SOURCE to 600 in order to get the standard + * version of strerror_r when using glibc. Otherwise glibc will give + * us a version which may not populate the buffer. + */ +#define _XOPEN_SOURCE 600 +#include + + #import "common.h" #import "Foundation/NSDictionary.h" #import "Foundation/NSError.h"