File ImageMagick-6.6.5-8-reason-error-message.patch of Package ImageMagick.import5132

Index: magick/exception.c
===================================================================
--- magick/exception.c.orig
+++ magick/exception.c
@@ -457,7 +457,11 @@ MagickExport char *GetExceptionMessage(c
 
   *exception='\0';
 #if defined(MAGICKCORE_HAVE_STRERROR_R)
-  (void) strerror_r(error,exception,sizeof(exception));
+  #if !defined(_GNU_SOURCE)
+    (void) strerror_r(error,exception,sizeof(exception));
+  #else
+    (void) CopyMagickString(exception,strerror_r(error, exception, sizeof(exception)),sizeof(exception));
+  #endif
 #else
   (void) CopyMagickString(exception,strerror(error),sizeof(exception));
 #endif
openSUSE Build Service is sponsored by