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

[Libguestfs] [PATCH 9/10] Mac OS X: strerror_r on Macs is not like GNU strerror_r.



-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
>From 5cdfcf8c74aff89ea342afec6a296bee0c9d447a Mon Sep 17 00:00:00 2001
From: Richard Jones <rich koneko home annexia org>
Date: Sun, 21 Mar 2010 17:15:26 +0000
Subject: [PATCH 09/10] 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?
---
 src/guestfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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
-- 
1.6.4.1


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