summaryrefslogtreecommitdiff
path: root/package/libnl/patches/patch-src_lib_utils_c
diff options
context:
space:
mode:
Diffstat (limited to 'package/libnl/patches/patch-src_lib_utils_c')
-rw-r--r--package/libnl/patches/patch-src_lib_utils_c25
1 files changed, 25 insertions, 0 deletions
diff --git a/package/libnl/patches/patch-src_lib_utils_c b/package/libnl/patches/patch-src_lib_utils_c
new file mode 100644
index 000000000..6d75c3acf
--- /dev/null
+++ b/package/libnl/patches/patch-src_lib_utils_c
@@ -0,0 +1,25 @@
+--- libnl-libnl3_2_29.orig/src/lib/utils.c 2016-12-30 15:57:01.000000000 +0100
++++ libnl-libnl3_2_29/src/lib/utils.c 2017-04-26 20:09:18.149933980 +0200
+@@ -81,6 +81,7 @@ void nl_cli_fatal(int err, const char *f
+ fprintf(stderr, "\n");
+ } else {
+ char *buf;
++#ifdef HAVE_STRERROR_L
+ locale_t loc = newlocale(LC_MESSAGES_MASK, "", (locale_t)0);
+ if (loc == (locale_t)0) {
+ if (errno == ENOENT)
+@@ -91,9 +92,14 @@ void nl_cli_fatal(int err, const char *f
+ }
+ if (loc != (locale_t)0)
+ buf = strerror_l(err, loc);
++#else
++ buf = strerror(err);
++#endif
+ fprintf(stderr, "%s\n", buf);
++#ifdef HAVE_STRERROR_L
+ if (loc != (locale_t)0)
+ freelocale(loc);
++#endif
+ }
+
+ exit(abs(err));