diff -up libedit-20100424-3.0/configure.ac.orig libedit-20100424-3.0/configure.ac --- libedit-20100424-3.0/configure.ac.orig 2010-04-29 17:13:51.201588736 -0600 +++ libedit-20100424-3.0/configure.ac 2010-04-29 17:13:56.768344064 -0600 @@ -46,7 +46,7 @@ AC_FUNC_ALLOCA AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS([fcntl.h limits.h malloc.h stdlib.h string.h sys/ioctl.h sys/param.h unistd.h curses.h ncurses.h sys/cdefs.h]) +AC_CHECK_HEADERS([fcntl.h limits.h malloc.h stdint.h stdlib.h string.h sys/errno.h errno.h sys/ioctl.h sys/param.h unistd.h curses.h ncurses.h sys/cdefs.h langinfo.h]) AC_CHECK_HEADER([termios.h], [], [AC_MSG_ERROR([termios.h is required!])],[]) diff -up libedit-20100424-3.0/examples/fileman.c.orig libedit-20100424-3.0/examples/fileman.c --- libedit-20100424-3.0/examples/fileman.c.orig 2010-04-29 17:11:46.768868352 -0600 +++ libedit-20100424-3.0/examples/fileman.c 2010-04-29 17:11:53.987496448 -0600 @@ -11,7 +11,11 @@ #include #include #include +#ifdef HAVE_SYS_ERRNO_H #include +#elif HAVE_ERRNO_H +#include +#endif #include #include #include diff -up libedit-20100424-3.0/src/el.c.orig libedit-20100424-3.0/src/el.c --- libedit-20100424-3.0/src/el.c.orig 2010-04-29 17:13:07.215482368 -0600 +++ libedit-20100424-3.0/src/el.c 2010-04-29 17:13:27.866385920 -0600 @@ -55,7 +55,9 @@ __RCSID("$NetBSD: el.c,v 1.59 2010/04/15 #include #include #include +#ifdef HAVE_LANGINFO_H #include +#endif #include "el.h" /* el_init(): diff -up libedit-20100424-3.0/src/vis.c.orig libedit-20100424-3.0/src/vis.c --- libedit-20100424-3.0/src/vis.c.orig 2010-04-29 17:12:31.912261120 -0600 +++ libedit-20100424-3.0/src/vis.c 2010-04-29 17:12:56.681574400 -0600 @@ -67,6 +67,10 @@ __RCSID("$NetBSD: vis.c,v 1.41 2009/11/2 #include #include +#ifdef HAVE_STDINT_H +#include +#endif + #ifdef __weak_alias __weak_alias(strsvis,_strsvis) __weak_alias(strsvisx,_strsvisx) diff -up libedit-20100424-3.0/src/editline/readline.h.orig libedit-20100424-3.0/src/editline/readline.h --- libedit-20100424-3.0/src/editline/readline.h.orig 2010-04-29 17:12:05.235143168 -0600 +++ libedit-20100424-3.0/src/editline/readline.h 2010-04-29 17:12:16.735313920 -0600 @@ -75,7 +75,7 @@ typedef KEYMAP_ENTRY *Keymap; #ifndef CTRL #include -#if !defined(__sun) && !defined(__hpux) && !defined(_AIX) +#if !defined(__sun) && !defined(__hpux) && !defined(_AIX) && !defined(__HAIKU__) #include #endif #ifndef CTRL