]> git.ipfire.org Git - thirdparty/lxc.git/commit
Use AC_HEADER_MAJOR to detect major()/minor()/makedev()
authorSergei Trofimovich <siarheit@google.com>
Sat, 21 Jan 2017 11:57:13 +0000 (11:57 +0000)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 23 Jan 2017 04:50:10 +0000 (23:50 -0500)
commite44a5652bcdb3da98764e1bb94399434c0dfbade
tree2be5f542984064e1c80ce0662410a38985a4cb9b
parente8a89cf398f47bfbdc186fbeb1c9c82917dd6044
Use AC_HEADER_MAJOR to detect major()/minor()/makedev()

Before the change build failed on Gentoo as:

  bdev/lxclvm.c: In function 'lvm_detect':
  bdev/lxclvm.c:140:4: error: implicit declaration of function 'major' [-Werror=implicit-function-declaration]
    major(statbuf.st_rdev), minor(statbuf.st_rdev));
    ^~~~~
  bdev/lxclvm.c:140:28: error: implicit declaration of function 'minor' [-Werror=implicit-function-declaration]
    major(statbuf.st_rdev), minor(statbuf.st_rdev));
                            ^~~~~

glibc plans to remove <sys/sysmacros.h> from glibc's <sys/types.h>:
    https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html

Gentoo already applied glibc patch to experimental glibc-2.24
to start preparingfor the change.

Autoconf has AC_HEADER_MAJOR to find out which header defines
reqiured macros:
    https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Particular-Headers.html

This change should also increase portability across other libcs.

Bug: https://bugs.gentoo.org/604360
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
configure.ac
src/lxc/bdev.c
src/lxc/conf.c
src/lxc/lxccontainer.c