aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os/xprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/os/xprintf.c')
-rw-r--r--xorg-server/os/xprintf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xorg-server/os/xprintf.c b/xorg-server/os/xprintf.c
index cc5a9b355..fecaa1443 100644
--- a/xorg-server/os/xprintf.c
+++ b/xorg-server/os/xprintf.c
@@ -64,6 +64,8 @@
#include "os.h"
#include <stdarg.h>
#include <stdio.h>
+#include <errno.h>
+#include <string.h>
#ifdef asprintf
# undef asprintf
@@ -161,8 +163,7 @@ XNFvasprintf(char **ret, const char * _X_RESTRICT_KYWD format, va_list va)
{
int size = vasprintf(ret, format, va);
if ((size == -1) || (*ret == NULL)) {
- Error("XNFvasprintf");
- FatalError("XNFvasprintf failed");
+ FatalError("XNFvasprintf failed: %s", strerror(errno));
}
return size;
}