summaryrefslogtreecommitdiff
path: root/lib/readline/examples/rl.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/readline/examples/rl.c')
-rw-r--r--lib/readline/examples/rl.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/readline/examples/rl.c b/lib/readline/examples/rl.c
index d2604895..c608c15f 100644
--- a/lib/readline/examples/rl.c
+++ b/lib/readline/examples/rl.c
@@ -31,12 +31,19 @@
#include <stdio.h>
#include <sys/types.h>
-#include "posixstat.h"
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+extern void exit();
+#endif
#if defined (READLINE_LIBRARY)
+# include "posixstat.h"
# include "readline.h"
# include "history.h"
#else
+# include <sys/stat.h>
# include <readline/readline.h>
# include <readline/history.h>
#endif