summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2018-01-14 20:10:55 +0100
committerThomas Deutschmann <whissi@gentoo.org>2018-01-14 20:11:11 +0100
commit245e296b2cf5918d52b52e33af1822d424732ebe (patch)
tree4e2003c7bfcacaa0d5e06e9ded3dc213ba91ddcd /sys-apps/smartmontools
parentapp-vim/slimv: version bump. (diff)
downloadgentoo-245e296b2cf5918d52b52e33af1822d424732ebe.tar.gz
gentoo-245e296b2cf5918d52b52e33af1822d424732ebe.tar.bz2
gentoo-245e296b2cf5918d52b52e33af1822d424732ebe.zip
sys-apps/smartmontools: Fix build on MUSL
Closes: https://bugs.gentoo.org/644586 Package-Manager: Portage-2.3.19, Repoman-2.3.6
Diffstat (limited to 'sys-apps/smartmontools')
-rw-r--r--sys-apps/smartmontools/files/smartmontools-6.6-fix-build-on-musl.patch13
-rw-r--r--sys-apps/smartmontools/smartmontools-6.6.ebuild2
2 files changed, 15 insertions, 0 deletions
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