Signed-off-by: Björn Esser <b.es...@pengutronix.de> --- ChangeLog:
* v1 --> v2: Revised as pointed out by ukk. .../0001-It-s-lpthread-not-lpthreads.patch | 2 +- ...-fix-build-failure-with-recent-glibc.patch | 34 +++++++++++++++++++ patches/perl-5.18.2/series | 3 +- 3 files changed, 37 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..ecdcd0aee 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 @@ -9,7 +9,7 @@ with -Dusethreads 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..358c8439f --- /dev/null +++ b/patches/perl-5.18.2/0002-fix-build-failure-with-recent-glibc.patch @@ -0,0 +1,34 @@ +From: David Mitchell <da...@iabyn.com> +Date: Fri, 11 May 2018 08:03:42 +0100 +Subject: [PATCH] fix build failure with recent glibc + +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. +--- + 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