From b25df17dd08aa5150ea3e09dbf79cdf7c73e02ed Mon Sep 17 00:00:00 2001 From: Felix Janda Date: Fri, 14 Apr 2017 17:56:20 -0400 Subject: [PATCH] sys-apps/watchdog: add two musl patches and bump eapi Gentoo-Bug: https://bugs.gentoo.org/604260 (cherry picked from commit 02ab37b0d2b57a6c40e0b93978d37d8c4dc611bb) Signed-off-by: Robin H. Johnson Fixes: https://github.com/gentoo/gentoo/pull/4423 --- .../files/watchdog-5.15-musl-nfs.patch | 27 +++++++++++++++++++ .../watchdog/files/watchdog-5.15-musl.patch | 23 ++++++++++++++++ sys-apps/watchdog/watchdog-5.15.ebuild | 9 +++++-- 3 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 sys-apps/watchdog/files/watchdog-5.15-musl-nfs.patch create mode 100644 sys-apps/watchdog/files/watchdog-5.15-musl.patch diff --git a/sys-apps/watchdog/files/watchdog-5.15-musl-nfs.patch b/sys-apps/watchdog/files/watchdog-5.15-musl-nfs.patch new file mode 100644 index 0000000000000..bee4ddc8d7bcb --- /dev/null +++ b/sys-apps/watchdog/files/watchdog-5.15-musl-nfs.patch @@ -0,0 +1,27 @@ +commit f52c40680f0aad44b9ae16648803453ec00cbb2c +Author: Paul Crawford +Date: Fri Dec 30 15:55:45 2016 +0000 + + Compile with musl when nfs is disabled + + musl does by default not ship with rpc headers. The watchdog should + not require rpc headers when nfs support is disabled. + + Patch by Felix Janda + +diff --git a/include/sundries.h b/include/sundries.h +index 4379982..98c489a 100644 +--- a/include/sundries.h ++++ b/include/sundries.h +@@ -9,9 +9,11 @@ + #include + #include + #include ++#if HAVE_NFS + #if !defined(bool_t) && !defined(__GLIBC__) + #include + #endif ++#endif + + extern int mount_mount_quiet; + extern int mount_verbose; diff --git a/sys-apps/watchdog/files/watchdog-5.15-musl.patch b/sys-apps/watchdog/files/watchdog-5.15-musl.patch new file mode 100644 index 0000000000000..ae62c8014e5b7 --- /dev/null +++ b/sys-apps/watchdog/files/watchdog-5.15-musl.patch @@ -0,0 +1,23 @@ +commit c5cb4e1a0339844ae3f55ff1dc4a716c28012f05 +Author: Paul Crawford +Date: Tue Jun 28 18:08:48 2016 +0100 + + Include linux/param.h for EXEC_PAGESIZE definition + + Musl does not include linux/param.h whereas glibc does, so it fails + to build on musl. Patch supplied by Khem Raj + +diff --git a/src/watchdog.c b/src/watchdog.c +index acf6450..486384a 100644 +--- a/src/watchdog.c ++++ b/src/watchdog.c +@@ -26,6 +26,9 @@ + #include /* For EXEC_PAGESIZE */ + #include + #include ++#ifdef __linux__ ++#include ++#endif + #include + + #include diff --git a/sys-apps/watchdog/watchdog-5.15.ebuild b/sys-apps/watchdog/watchdog-5.15.ebuild index 900a3d31388d1..887cff3008006 100644 --- a/sys-apps/watchdog/watchdog-5.15.ebuild +++ b/sys-apps/watchdog/watchdog-5.15.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=6 inherit toolchain-funcs flag-o-matic systemd @@ -17,6 +17,11 @@ IUSE="nfs" DEPEND="nfs? ( net-libs/libtirpc )" RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}"/${P}-musl.patch + "${FILESDIR}"/${P}-musl-nfs.patch +) + src_configure() { if use nfs ; then tc-export PKG_CONFIG