summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérémie Courrèges-Anglas <jca@wxcvbn.org>2014-09-14 18:26:33 +0200
committerJérémie Courrèges-Anglas <jca@wxcvbn.org>2014-09-14 18:26:56 +0200
commitb36c633127fcf41b76da9c01494e59ba272d3c7c (patch)
tree536447c3e86ae25af321a32f6cb7ca7c7ff2e3ea
parent67b4b1b86ecdb251f23970ed0713da445c00804d (diff)
downloadratpoison-b36c633127fcf41b76da9c01494e59ba272d3c7c.zip
Check for and include sys/stat.h
* needed by the recent use of fchmod, missing include warning triggered on Debian stable but not OpenBSD
-rw-r--r--configure.ac2
-rw-r--r--src/history.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index c90eb31..acbed8f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -188,7 +188,7 @@ AS_IF([test "$with_electric_fence" = yes],
dnl Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS([pwd.h sys/ioctl.h])
+AC_CHECK_HEADERS([pwd.h sys/ioctl.h sys/stat.h])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_TYPEOF
diff --git a/src/history.c b/src/history.c
index 421973e..d1e9938 100644
--- a/src/history.c
+++ b/src/history.c
@@ -25,6 +25,10 @@
#include "ratpoison.h"
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
#ifdef HAVE_HISTORY
#include "readline/history.h"
#endif