diff -ruw src.orig//lib/nsutils.c src/lib/nsutils.c
--- src.orig//lib/nsutils.c	2014-01-21 17:48:43.498126752 +0100
+++ src/lib/nsutils.c	2014-01-21 17:54:12.342018836 +0100
@@ -1,5 +1,7 @@
 #include <errno.h>
+#ifdef HAVE_ERROR_H
 #include <error.h>
+#endif
 #include <stdio_ext.h>
 #include <stdlib.h>
 #include <sys/types.h>
diff -ruw src.orig//ps/display.c src/ps/display.c
--- src.orig//ps/display.c	2014-01-21 17:48:43.494126753 +0100
+++ src/ps/display.c	2014-01-21 17:55:30.873993064 +0100
@@ -25,7 +25,9 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#ifdef HAVE_ERROR_H
 #include <error.h>
+#endif
 
 #include <sys/sysmacros.h>
 #include <sys/types.h>
diff -ruw src.orig//ps/global.c src/ps/global.c
--- src.orig//ps/global.c	2014-01-21 17:48:43.494126753 +0100
+++ src/ps/global.c	2014-01-21 17:54:18.718016743 +0100
@@ -25,7 +25,9 @@
 #include <string.h>
 #include <termios.h>
 #include <unistd.h>
+#ifdef HAVE_ERROR_H
 #include <error.h>
+#endif
 
 #include <sys/ioctl.h>
 #include <sys/stat.h>
diff -ru src/ps/display.c src.new//ps/display.c
--- src/ps/display.c	2014-02-06 17:58:20.892279323 +0100
+++ src.new//ps/display.c	2014-02-06 17:57:59.044286492 +0100
@@ -65,7 +65,11 @@
     case SIGUSR2:
       exit(EXIT_FAILURE);
     default:
+#ifdef HAVE_ERROR_H
       error_at_line(0, 0, __FILE__, __LINE__, "%s", _("please report this bug"));
+#else
+      fprintf(stderr, "%s:%u: %s", __FILE__, __LINE__, _("please report this bug"));
+#endif
       signal(signo, SIG_DFL);  /* allow core file creation */
       kill(getpid(), signo);
   }
diff -ru src/ps/global.c src.new//ps/global.c
--- src/ps/global.c	2014-02-06 17:58:20.892279323 +0100
+++ src.new//ps/global.c	2014-02-06 17:57:46.452290624 +0100
@@ -524,6 +524,10 @@
 		     unsigned int linenum,
 		     const char *message)
 {
+#ifdef HAVE_ERROR_H
   error_at_line(0, 0, filename, linenum, "%s", message);
+#else
+  fprintf(stderr, "%s:%u: %s", filename, linenum, message);
+#endif
   exit(EXIT_FAILURE);
 }
