about summary refs log tree commit diff
path: root/pkgs/development/libraries/libidn2/fix-error-darwin.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/libidn2/fix-error-darwin.patch')
-rw-r--r--pkgs/development/libraries/libidn2/fix-error-darwin.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libidn2/fix-error-darwin.patch b/pkgs/development/libraries/libidn2/fix-error-darwin.patch
new file mode 100644
index 000000000000..db3edd6e4a08
--- /dev/null
+++ b/pkgs/development/libraries/libidn2/fix-error-darwin.patch
@@ -0,0 +1,31 @@
+diff --git a/src/idn2.c b/src/idn2.c
+index 6abbc72..804f0f2 100644
+--- a/src/idn2.c
++++ b/src/idn2.c
+@@ -31,7 +31,6 @@
+ #include <unistr.h>
+ 
+ /* Gnulib headers. */
+-#include "error.h"
+ #include "gettext.h"
+ #define _(String) dgettext (PACKAGE, String)
+ #include "progname.h"
+@@ -161,9 +160,7 @@ process_input (char *readbuf, int flags)
+       free (output);
+     }
+   else
+-    error (EXIT_FAILURE, 0, "%s: %s",
+-	   args_info.register_given ? "register" : "lookup",
+-	   idn2_strerror (rc));
++    perror (idn2_strerror (rc));
+ }
+ 
+ int
+@@ -222,7 +219,7 @@ main (int argc, char *argv[])
+     }
+ 
+   if (ferror (stdin))
+-    error (EXIT_FAILURE, errno, "%s", _("input error"));
++    perror (_("input error"));
+ 
+   cmdline_parser_free (&args_info);