Commit 4893a431 by Christian Brauner Committed by GitHub

Merge pull request #1388 from trofi/master

Use AC_HEADER_MAJOR to detect major()/minor()/makedev()
parents b7329ceb af6824fc
......@@ -640,6 +640,9 @@ AC_CHECK_DECLS([PR_GET_NO_NEW_PRIVS], [], [], [#include <sys/prctl.h>])
# Check for some headers
AC_CHECK_HEADERS([sys/signalfd.h pty.h ifaddrs.h sys/capability.h sys/memfd.h sys/personality.h utmpx.h sys/timerfd.h])
# lookup major()/minor()/makedev()
AC_HEADER_MAJOR
# Check for some syscalls functions
AC_CHECK_FUNCS([setns pivot_root sethostname unshare rand_r confstr faccessat gettid memfd_create])
......
......@@ -32,10 +32,19 @@
#include <sys/wait.h>
#include "bdev.h"
#include "config.h"
#include "log.h"
#include "lxclvm.h"
#include "utils.h"
/* major()/minor() */
#ifdef MAJOR_IN_MKDEV
# include <sys/mkdev.h>
#endif
#ifdef MAJOR_IN_SYSMACROS
# include <sys/sysmacros.h>
#endif
lxc_log_define(lxclvm, lxc);
extern char *dir_new_path(char *src, const char *oldname, const char *name,
......
......@@ -52,6 +52,14 @@
#include <sys/utsname.h>
#include <sys/wait.h>
/* makedev() */
#ifdef MAJOR_IN_MKDEV
# include <sys/mkdev.h>
#endif
#ifdef MAJOR_IN_SYSMACROS
# include <sys/sysmacros.h>
#endif
#ifdef HAVE_STATVFS
#include <sys/statvfs.h>
#endif
......
......@@ -60,6 +60,14 @@
#include "utils.h"
#include "version.h"
/* major()/minor() */
#ifdef MAJOR_IN_MKDEV
# include <sys/mkdev.h>
#endif
#ifdef MAJOR_IN_SYSMACROS
# include <sys/sysmacros.h>
#endif
#if HAVE_IFADDRS_H
#include <ifaddrs.h>
#else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment