aboutsummaryrefslogtreecommitdiff
path: root/devel/leatherman
diff options
context:
space:
mode:
authorRomain Tartière <romain@FreeBSD.org>2017-10-12 16:53:01 +0000
committerRomain Tartière <romain@FreeBSD.org>2017-10-12 16:53:01 +0000
commit58e32e7bfa41e405b7fd5355f93da4fa73d9d1a9 (patch)
tree7e06ccd96bdf86983c7d516a23fa4538783a73d9 /devel/leatherman
parentaea750b00a2dfaa13fc13588cc595aa0e2fde22d (diff)
downloadports-58e32e7bfa41e405b7fd5355f93da4fa73d9d1a9.tar.gz
ports-58e32e7bfa41e405b7fd5355f93da4fa73d9d1a9.zip
Woraround crash when LC_* is not set
Puppet and MCollective define LC_ALL=C.UTF-8 to avoid this crash, but it's still a problem for many use cases (e.g. cron job storing facts for MCollective). While this does not fix the root cause of the crash that is still under investigation, this makes facter usable regardless of the user's envrionment. PR: 222125 Submitted by: ryanb@honeycomb.net
Notes
Notes: svn path=/head/; revision=451907
Diffstat (limited to 'devel/leatherman')
-rw-r--r--devel/leatherman/Makefile2
-rw-r--r--devel/leatherman/files/patch-locale_src_locale.cc12
2 files changed, 13 insertions, 1 deletions
diff --git a/devel/leatherman/Makefile b/devel/leatherman/Makefile
index a729f077ed69..3ed1da1bed1e 100644
--- a/devel/leatherman/Makefile
+++ b/devel/leatherman/Makefile
@@ -2,7 +2,7 @@
PORTNAME= leatherman
PORTVERSION= 1.3.0
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= devel
MAINTAINER= puppet@FreeBSD.org
diff --git a/devel/leatherman/files/patch-locale_src_locale.cc b/devel/leatherman/files/patch-locale_src_locale.cc
new file mode 100644
index 000000000000..f7bf02043e86
--- /dev/null
+++ b/devel/leatherman/files/patch-locale_src_locale.cc
@@ -0,0 +1,12 @@
+--- locale/src/locale.cc.orig 2017-10-10 10:16:35 UTC
++++ locale/src/locale.cc
+@@ -43,6 +43,9 @@ namespace leatherman { namespace locale
+ gen.add_messages_domain(domain);
+ }
+
++ if (id.empty())
++ return g_locales.insert(make_pair(domain, std::locale())).first->second;
++
+ // Ensure creating and adding a new locale is thread-safe.
+ try {
+ return g_locales.insert(make_pair(domain, gen(id))).first->second;