From 245e296b2cf5918d52b52e33af1822d424732ebe Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann Date: Sun, 14 Jan 2018 20:10:55 +0100 Subject: sys-apps/smartmontools: Fix build on MUSL Closes: https://bugs.gentoo.org/644586 Package-Manager: Portage-2.3.19, Repoman-2.3.6 --- .../files/smartmontools-6.6-fix-build-on-musl.patch | 13 +++++++++++++ sys-apps/smartmontools/smartmontools-6.6.ebuild | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 sys-apps/smartmontools/files/smartmontools-6.6-fix-build-on-musl.patch diff --git a/sys-apps/smartmontools/files/smartmontools-6.6-fix-build-on-musl.patch b/sys-apps/smartmontools/files/smartmontools-6.6-fix-build-on-musl.patch new file mode 100644 index 000000000000..2cd36e0dce5e --- /dev/null +++ b/sys-apps/smartmontools/files/smartmontools-6.6-fix-build-on-musl.patch @@ -0,0 +1,13 @@ +Bug: https://bugs.gentoo.org/644586 + +Upstream fix: https://www.smartmontools.org/changeset/4603 + +--- smartmontools-6.6/os_linux.cpp ++++ smartmontools-6.6/os_linux.cpp +@@ -3177,5 +3177,5 @@ + char path[128]; + snprintf(path, sizeof(path), "/sys/block/%s/device", name); +- char * syshostpath = canonicalize_file_name(path); ++ char * syshostpath = realpath(name, (char *)0); + if (!syshostpath) + return false; diff --git a/sys-apps/smartmontools/smartmontools-6.6.ebuild b/sys-apps/smartmontools/smartmontools-6.6.ebuild index e96fcf919473..5edbb8d138d3 100644 --- a/sys-apps/smartmontools/smartmontools-6.6.ebuild +++ b/sys-apps/smartmontools/smartmontools-6.6.ebuild @@ -47,6 +47,8 @@ RDEPEND="${DEPEND} REQUIRED_USE="( caps? ( daemon ) )" +PATCHES=( "${FILESDIR}"/${P}-fix-build-on-musl.patch ) + src_prepare() { default -- cgit v1.2.3-65-gdbad