aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/perl/files/5.26/perl-5.26.3-part5.patch')
-rw-r--r--dev-lang/perl/files/5.26/perl-5.26.3-part5.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/dev-lang/perl/files/5.26/perl-5.26.3-part5.patch b/dev-lang/perl/files/5.26/perl-5.26.3-part5.patch
new file mode 100644
index 00000000..e9cac65f
--- /dev/null
+++ b/dev-lang/perl/files/5.26/perl-5.26.3-part5.patch
@@ -0,0 +1,35 @@
+From 04db542212fdad3a62f13afe741c99028f4bf799 Mon Sep 17 00:00:00 2001
+From: Andy Dougherty <doughera@lafayette.edu>
+Date: Thu, 31 Jan 2019 14:05:41 -0500
+Subject: [PATCH] Define _GNU_SOURCE if using the musl libc on linux.
+
+Together with prior commits ba73a4cb8f, f8d82a1010, and 63c1fa6a98,
+this should close [perl #133760].
+---
+ hints/linux.sh | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/hints/linux.sh b/hints/linux.sh
+index 3f38ea07f1..a985a8ee1b 100644
+--- a/hints/linux.sh
++++ b/hints/linux.sh
+@@ -178,6 +178,16 @@ case "$plibpth" in
+ ;;
+ esac
+
++# For the musl libc, perl should #define _GNU_SOURCE. Otherwise, some
++# available functions, like memem, won't be used. See the discussion in
++# [perl #133760]. musl doesn't offer an easy way to identify it, but,
++# at least on alpine linux, the ldd --version output contains the
++# string 'musl.'
++case `ldd --version 2>&1` in
++ musl*) ccflags="$ccflags -D_GNU_SOURCE" ;;
++ *) ;;
++esac
++
+ # libquadmath is sometimes installed as gcc internal library,
+ # so contrary to our usual policy of *not* looking at gcc internal
+ # directories we now *do* look at them, in case they contain
+--
+2.15.1-424-g9478a660812
+