From: Richard Jones Date: Sun, 21 Mar 2010 17:15:26 +0000 (+0000) Subject: Mac OS X: strerror_r on Macs is not like GNU strerror_r. X-Git-Tag: 1.0.87~16 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=a28791d6ac818761405fe898c600bafd7137b857;p=libguestfs.git Mac OS X: strerror_r on Macs is not like GNU strerror_r. Really this should be turned into a configure-time test. Perhaps one exists already? --- diff --git a/src/guestfs.c b/src/guestfs.c index a00e8db..01642b4 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -395,7 +395,7 @@ guestfs_perrorf (guestfs_h *g, const char *fs, ...) if (err < 0) return; -#ifndef _GNU_SOURCE +#if !defined(_GNU_SOURCE) || defined(__APPLE__) char buf[256]; strerror_r (errnum, buf, sizeof buf); #else