diff --git a/configure.ac b/configure.ac index 5d8a719133da8293dac7a7d62eedb485dd32fda1..afffe705927a12166f948fe9b9ad7b7812a3dbd3 100644 --- a/configure.ac +++ b/configure.ac @@ -101,12 +101,17 @@ AC_LANG_POP(C++) # Check for chroot support (requires chroot() and bind mounts). AC_CHECK_FUNCS([chroot]) -AC_CHECK_HEADERS([sys/mount.h]) +AC_CHECK_HEADERS([sys/param.h], [], [], []) +AC_CHECK_HEADERS([sys/mount.h], [], [], +[#ifdef HAVE_SYS_PARAM_H +# include <sys/param.h> +# endif +]) # Check for <locale> AC_LANG_PUSH(C++) -AC_CHECK_HEADERS([locale]) +AC_CHECK_HEADERS([locale], [], [], []) AC_LANG_POP(C++) diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 533883dc5298c470bb4749df340f61f40ec338f0..36e3b5e1dd8b590757c6ff13dee082290e8959c3 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -24,13 +24,17 @@ #include <pwd.h> #include <grp.h> + +/* Includes required for chroot support. */ #include "config.h" +#if HAVE_SYS_PARAM_H +#include <sys/param.h> +#endif #if HAVE_SYS_MOUNT_H #include <sys/mount.h> #endif - #define CHROOT_ENABLED HAVE_CHROOT && HAVE_SYS_MOUNT_H && defined(MS_BIND)