aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/perl/perl-5.26.1-guard_old_libcrypt_fix.patch
blob: d1ec6083a17e827b49c15141ca7038bd06b974ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From be16bcb15fa523ec7a0bb5ed5aabd99420c60c6b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=E0=B8=A3=E0=B8=96rn=20Esser?=
 <besser82@fedoraproject.org>
Date: Sat, 20 Jan 2018 20:22:53 +0100
Subject: [PATCH] perl: add patch to solve libcrypt incompatibility

commit 13e70b397dcb0d1bf4a869b670f041c1d7b730d0

    pp: Guard fix for really old bug in glibc libcrypt

Upstream-Status: Pending
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

---
 pp.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/pp.c b/pp.c
index fbba3bd..1e0a5eb 100644
--- a/pp.c
+++ b/pp.c
@@ -3737,8 +3737,12 @@ PP(pp_crypt)
 #if defined(__GLIBC__) || defined(__EMX__)
 	if (PL_reentrant_buffer->_crypt_struct_buffer) {
 	    PL_reentrant_buffer->_crypt_struct_buffer->initialized = 0;
-	    /* work around glibc-2.2.5 bug */
+#if (defined(__GLIBC__) && __GLIBC__ == 2) && \
+    (defined(__GLIBC_MINOR__) && __GLIBC_MINOR__ >= 2 && __GLIBC_MINOR__ < 4)
+	    /* work around glibc-2.2.5 bug, has been fixed at some
+	     * time in glibc-2.3.X */
 	    PL_reentrant_buffer->_crypt_struct_buffer->current_saltbits = 0;
+#endif
 	}
 #endif
     }