From fba974e99b93d9f151d7012cc37a969a0592b726 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 21 Jan 2017 11:52:28 +0000 Subject: [PATCH] app-emulation/lxc: fix build failure against glibc-2.24, bug #604360 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reported-by: Toralf Förster Bug: https://bugs.gentoo.org/604360 Package-Manager: Portage-2.3.3, Repoman-2.3.1 --- app-emulation/lxc/files/lxc-2.0.6-major.patch | 74 +++++++++++++++++++ app-emulation/lxc/lxc-2.0.6-r1.ebuild | 3 +- 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 app-emulation/lxc/files/lxc-2.0.6-major.patch diff --git a/app-emulation/lxc/files/lxc-2.0.6-major.patch b/app-emulation/lxc/files/lxc-2.0.6-major.patch new file mode 100644 index 000000000000..beb379a53882 --- /dev/null +++ b/app-emulation/lxc/files/lxc-2.0.6-major.patch @@ -0,0 +1,74 @@ +Adapt to future removal of major()/minor()/makedev() from + +Gentoo removed it in glibc-2.24. + +https://bugs.gentoo.org/575232 +https://bugs.gentoo.org/604360 +diff --git a/configure.ac b/configure.ac +index 4640c0d..71e6450 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -620,4 +620,7 @@ AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include ]) + AC_CHECK_HEADERS([sys/signalfd.h pty.h ifaddrs.h sys/capability.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]) +diff --git a/src/lxc/bdev/lxclvm.c b/src/lxc/bdev/lxclvm.c +index 3d41b10..419d1c2 100644 +--- a/src/lxc/bdev/lxclvm.c ++++ b/src/lxc/bdev/lxclvm.c +@@ -33,8 +33,17 @@ + + #include "bdev.h" ++#include "config.h" + #include "log.h" + #include "lxclvm.h" + #include "utils.h" + ++/* major()/minor() */ ++#ifdef MAJOR_IN_MKDEV ++# include ++#endif ++#ifdef MAJOR_IN_SYSMACROS ++# include ++#endif ++ + lxc_log_define(lxclvm, lxc); + +diff --git a/src/lxc/conf.c b/src/lxc/conf.c +index c54ee41..9a00e7f 100644 +--- a/src/lxc/conf.c ++++ b/src/lxc/conf.c +@@ -40,4 +40,12 @@ + #include + ++/* makedev() */ ++#ifdef MAJOR_IN_MKDEV ++# include ++#endif ++#ifdef MAJOR_IN_SYSMACROS ++# include ++#endif ++ + #ifdef HAVE_STATVFS + #include +diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c +index 3a9e1e3..fe75fcc 100644 +--- a/src/lxc/lxccontainer.c ++++ b/src/lxc/lxccontainer.c +@@ -62,4 +62,12 @@ + #include "version.h" + ++/* major()/minor() */ ++#ifdef MAJOR_IN_MKDEV ++# include ++#endif ++#ifdef MAJOR_IN_SYSMACROS ++# include ++#endif ++ + #if HAVE_IFADDRS_H + #include diff --git a/app-emulation/lxc/lxc-2.0.6-r1.ebuild b/app-emulation/lxc/lxc-2.0.6-r1.ebuild index b6928bc24b60..569b71e4de98 100644 --- a/app-emulation/lxc/lxc-2.0.6-r1.ebuild +++ b/app-emulation/lxc/lxc-2.0.6-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ @@ -108,6 +108,7 @@ src_prepare() { eapply "${FILESDIR}"/${P}-bash-completion.patch #558854 eapply "${FILESDIR}"/${PN}-2.0.5-omit-sysconfig.patch + eapply "${FILESDIR}"/${PN}-2.0.6-major.patch eapply_user eautoreconf } -- 2.26.2