summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac5
-rw-r--r--src/shared/missing.h4
2 files changed, 7 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 9c8481e4b7..3ced6cf3d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -241,11 +241,12 @@ LIBS="$save_LIBS"
AC_CHECK_FUNCS([fanotify_init fanotify_mark])
AC_CHECK_FUNCS([__secure_getenv secure_getenv])
-AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns], [], [], [[#include <sys/types.h>
+AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, LO_FLAGS_PARTSCAN], [], [], [[#include <sys/types.h>
#include <unistd.h>
#include <sys/mount.h>
#include <fcntl.h>
-#include <sched.h>]])
+#include <sched.h>
+#include <linux/loop.h>]])
# This makes sure pkg.m4 is available.
m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
diff --git a/src/shared/missing.h b/src/shared/missing.h
index 4e63fb9ac4..ce4a6e36f4 100644
--- a/src/shared/missing.h
+++ b/src/shared/missing.h
@@ -365,3 +365,7 @@ static inline int setns(int fd, int nstype) {
return syscall(__NR_setns, fd, nstype);
}
#endif
+
+#if !HAVE_DECL_LO_FLAGS_PARTSCAN
+#define LO_FLAGS_PARTSCAN 8
+#endif