aboutsummaryrefslogtreecommitdiffstats
path: root/main/smokeping/musl-lc_numeric-utf8.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-02-14 08:32:42 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-02-14 08:33:24 +0000
commit8766dc4e2edda9c665dcb54d7a4f561bb5d623fc (patch)
tree059ed9bbf8f903b1fa85684cae44792746ffbc08 /main/smokeping/musl-lc_numeric-utf8.patch
parentafefb2d592d3dc40ce683d4dd1b9dc09d8ac478d (diff)
downloadaports-8766dc4e2edda9c665dcb54d7a4f561bb5d623fc.tar.bz2
aports-8766dc4e2edda9c665dcb54d7a4f561bb5d623fc.tar.xz
main/smokeping: fix build with musl
Diffstat (limited to 'main/smokeping/musl-lc_numeric-utf8.patch')
-rw-r--r--main/smokeping/musl-lc_numeric-utf8.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/main/smokeping/musl-lc_numeric-utf8.patch b/main/smokeping/musl-lc_numeric-utf8.patch
new file mode 100644
index 0000000000..bb702299ef
--- /dev/null
+++ b/main/smokeping/musl-lc_numeric-utf8.patch
@@ -0,0 +1,15 @@
+The local is returned as C.UTF-8 on musl which should be ok for numeric
+operations.
+
+--- ./lib/Smokeping.pm.orig
++++ ./lib/Smokeping.pm
+@@ -31,7 +31,8 @@
+ my $xssBadRx = qr/[<>%&'";]/;
+
+ $ENV{'LC_NUMERIC'}='C';
+-if (setlocale(LC_NUMERIC,"") ne "C") {
++my $lc_numeric = setlocale(LC_NUMERIC,"");
++if ($lc_numeric ne "C" && ! $lc_numeric =~ m/^C\./) {
+ if ($ENV{'LC_ALL'} eq 'C') {
+ # This has got to be a bug in perl/mod_perl, apache or libc
+ die("Your internalization implementation on your operating system is "