summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-12-09 20:06:09 +0100
committerMichał Górny <mgorny@gentoo.org>2018-12-09 20:16:00 +0100
commit1ae7ddd19bc5c2713e5b6a100c69663d58ca72fa (patch)
tree3a91490561252168d7c01d3182a5ed5976400c01 /sys-devel
parentapp-eselect/eselect-oodict: fix S (diff)
downloadgentoo-1ae7ddd19bc5c2713e5b6a100c69663d58ca72fa.tar.gz
gentoo-1ae7ddd19bc5c2713e5b6a100c69663d58ca72fa.tar.bz2
gentoo-1ae7ddd19bc5c2713e5b6a100c69663d58ca72fa.zip
sys-devel/distcc: Backport fix for crash on non-existing dir
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/distcc/distcc-3.3.2-r4.ebuild (renamed from sys-devel/distcc/distcc-3.3.2-r3.ebuild)2
-rw-r--r--sys-devel/distcc/files/distcc-3.3.2-noexist-crash.patch22
2 files changed, 24 insertions, 0 deletions
diff --git a/sys-devel/distcc/distcc-3.3.2-r3.ebuild b/sys-devel/distcc/distcc-3.3.2-r4.ebuild
index 1266d913df9..01cca1f446a 100644
--- a/sys-devel/distcc/distcc-3.3.2-r3.ebuild
+++ b/sys-devel/distcc/distcc-3.3.2-r4.ebuild
@@ -56,6 +56,8 @@ src_prepare() {
eapply "${FILESDIR}/${PN}-3.3.2-freedesktop.patch"
# SOCKSv5 support needed for Portage, bug #537616
eapply "${FILESDIR}/${PN}-3.2_rc1-socks5.patch"
+ # crash on missing directory
+ eapply "${FILESDIR}"/distcc-3.3.2-noexist-crash.patch
eapply_user
# Bugs #120001, #167844 and probably more. See patch for description.
diff --git a/sys-devel/distcc/files/distcc-3.3.2-noexist-crash.patch b/sys-devel/distcc/files/distcc-3.3.2-noexist-crash.patch
new file mode 100644
index 00000000000..7f378082d99
--- /dev/null
+++ b/sys-devel/distcc/files/distcc-3.3.2-noexist-crash.patch
@@ -0,0 +1,22 @@
+From 24f73c5cd8f839bd520eb52e91d0d26e07689373 Mon Sep 17 00:00:00 2001
+From: Shawn Landden <shawn@git.icu>
+Date: Wed, 29 Aug 2018 04:52:38 -0700
+Subject: [PATCH] fix #304
+
+---
+ src/daemon.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/daemon.c b/src/daemon.c
+index 5765982..c8fee7c 100644
+--- a/src/daemon.c
++++ b/src/daemon.c
+@@ -166,7 +166,7 @@ static void dcc_warn_masquerade_whitelist(void) {
+ rs_log_crit(LIBDIR "/distcc not found. %s", warn);
+ dcc_exit(EXIT_COMPILER_MISSING);
+ }
+- if (!readdir(e) && !readdir(d)) {
++ if ((!e || !readdir(e)) && (!d || !readdir(d))) {
+ rs_log_crit(LIBDIR "/distcc empty. %s", warn);
+ dcc_exit(EXIT_COMPILER_MISSING);
+ }