aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_private.h
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-12-08 11:57:06 +0000
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-12-08 11:57:06 +0000
commitb65f717688423c3b3f770d38d63ad681a53121c4 (patch)
tree934e7059f070c0195ae91e1175bd11505f047bd5 /tools/libxc/xc_private.h
parentc720eb6ab76d4b6699d022182daf014df3507d97 (diff)
downloadxen-b65f717688423c3b3f770d38d63ad681a53121c4.tar.gz
xen-b65f717688423c3b3f770d38d63ad681a53121c4.tar.bz2
xen-b65f717688423c3b3f770d38d63ad681a53121c4.zip
[LIBXC] Clean up use of sterror(). Define a thread-safe
version which uses strerror_r(), and tries to cope with the POSIX and GNU versions of that function. Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools/libxc/xc_private.h')
-rw-r--r--tools/libxc/xc_private.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/libxc/xc_private.h b/tools/libxc/xc_private.h
index f087e7de69..6dfbdead7a 100644
--- a/tools/libxc/xc_private.h
+++ b/tools/libxc/xc_private.h
@@ -59,11 +59,12 @@
#define PPRINTF(_f, _a...)
#endif
+char *safe_strerror(int errcode);
void xc_set_error(int code, const char *fmt, ...);
#define ERROR(_m, _a...) xc_set_error(XC_INTERNAL_ERROR, _m , ## _a )
#define PERROR(_m, _a...) xc_set_error(XC_INTERNAL_ERROR, _m " (%d = %s)", \
- ## _a , errno, strerror(errno))
+ ## _a , errno, safe_strerror(errno))
int lock_pages(void *addr, size_t len);
void unlock_pages(void *addr, size_t len);