mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] perl: Add patch for compatibility with recent libcrypt implementations.
@ 2019-10-10  8:44 Björn Esser
  2019-10-10  9:14 ` Uwe Kleine-König
  2019-10-10 12:39 ` [ptxdist] [PATCH] " Roland Hieber
  0 siblings, 2 replies; 6+ messages in thread
From: Björn Esser @ 2019-10-10  8:44 UTC (permalink / raw)
  To: ptxdist; +Cc: Björn Esser

Signed-off-by: Björn Esser <b.esser@pengutronix.de>
---
 .../0001-It-s-lpthread-not-lpthreads.patch    |  7 +++-
 ...-fix-build-failure-with-recent-glibc.patch | 39 +++++++++++++++++++
 patches/perl-5.18.2/series                    |  3 +-
 3 files changed, 47 insertions(+), 2 deletions(-)
 create mode 100644 patches/perl-5.18.2/0002-fix-build-failure-with-recent-glibc.patch

diff --git a/patches/perl-5.18.2/0001-It-s-lpthread-not-lpthreads.patch b/patches/perl-5.18.2/0001-It-s-lpthread-not-lpthreads.patch
index 319cefb2e..7a7bb1beb 100644
--- a/patches/perl-5.18.2/0001-It-s-lpthread-not-lpthreads.patch
+++ b/patches/perl-5.18.2/0001-It-s-lpthread-not-lpthreads.patch
@@ -1,15 +1,20 @@
 From: Michael Olbrich <m.olbrich@pengutronix.de>
 Date: Wed, 23 Apr 2014 09:02:25 +0200
 Subject: [PATCH] It's -lpthread not -lpthreads
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
 
 Otherwise linking fails with missing pthread symbols when building with
 with -Dusethreads
+
+Signed-off-by: Björn Esser <b.esser@pengutronix.de>
 ---
  cnf/configure_libs.sh | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/cnf/configure_libs.sh b/cnf/configure_libs.sh
-index f45d31c..cca73e5 100644
+index f45d31cfc413..cca73e5004fb 100644
 --- a/cnf/configure_libs.sh
 +++ b/cnf/configure_libs.sh
 @@ -53,7 +53,7 @@ if not hinted 'perllibs'; then
diff --git a/patches/perl-5.18.2/0002-fix-build-failure-with-recent-glibc.patch b/patches/perl-5.18.2/0002-fix-build-failure-with-recent-glibc.patch
new file mode 100644
index 000000000..5be0c0f1d
--- /dev/null
+++ b/patches/perl-5.18.2/0002-fix-build-failure-with-recent-glibc.patch
@@ -0,0 +1,39 @@
+From: David Mitchell <davem@iabyn.com>
+Date: Fri, 11 May 2018 08:03:42 +0100
+Subject: [PATCH] fix build failure with recent glibc
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+RT #133184
+
+pp_crypt() directly manipulates a field inside 'struct crypt_data' to work
+around a bug in an ancient glibc version from circa 2002. New glibc
+releases don't have this field so perl fails to compile. Make the hack
+conditional on glibc version.
+
+Stolen from a patch to the Fedora 28 distribution.
+
+Signed-off-by: Björn Esser <b.esser@pengutronix.de>
+---
+ pp.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/pp.c b/pp.c
+index 430cf857a628..d099af043995 100644
+--- a/pp.c
++++ b/pp.c
+@@ -3412,8 +3412,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
+     }
diff --git a/patches/perl-5.18.2/series b/patches/perl-5.18.2/series
index dbf4b587d..d504441ef 100644
--- a/patches/perl-5.18.2/series
+++ b/patches/perl-5.18.2/series
@@ -1,4 +1,5 @@
 # generated by git-ptx-patches
 #tag:base --start-number 1
 0001-It-s-lpthread-not-lpthreads.patch
-# 82701174c686d625c466a538b4d64ece  - git-ptx-patches magic
+0002-fix-build-failure-with-recent-glibc.patch
+# 1c17e4b9d62a94d4ee665ae8d0f4c9ff  - git-ptx-patches magic
-- 
2.23.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-10-10 13:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10  8:44 [ptxdist] [PATCH] perl: Add patch for compatibility with recent libcrypt implementations Björn Esser
2019-10-10  9:14 ` Uwe Kleine-König
2019-10-10  9:21   ` [ptxdist] [PATCH v2] " Björn Esser
2019-10-10 12:39 ` [ptxdist] [PATCH] " Roland Hieber
2019-10-10 12:45   ` Björn Esser
2019-10-10 13:25     ` Alexander Dahl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox