Index: src/main.c
--- src/main.c.orig	2011-04-01 17:02:03.000000000 +0200
+++ src/main.c	2011-04-02 23:56:02.000000000 +0200
@@ -23,8 +23,8 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
+#include <stdarg.h>
 #include <assert.h>
-#include <error.h>
 #include <errno.h>
 #include <stdbool.h>
 #include <sys/types.h>
@@ -34,6 +34,22 @@
 #include <unistd.h>
 #include <getopt.h>
 
+static void my_error (int ec, int eno, const char *fmt, ...);
+static void my_error (int ec, int eno, const char *fmt, ...)
+{
+    va_list ap;
+
+    va_start(ap, fmt);
+    if (eno != 0)
+        fprintf(stderr, "xmlpatch: ERROR: %s\n", strerror(eno));
+    fprintf(stderr, "xmlpatch: ERROR: ");
+    vfprintf(stderr, fmt, ap);
+    va_end(ap);
+    exit(ec);
+}
+
+#define error my_error
+
 #include <libxml/tree.h>
 
 #include "xml_patch.h"
