diff options
author | Max Rees <maxcrees@me.com> | 2020-03-24 01:34:41 -0500 |
---|---|---|
committer | Max Rees <maxcrees@me.com> | 2020-03-24 01:34:41 -0500 |
commit | 6c3b706e304a6ff23339e3595717d95863474e34 (patch) | |
tree | b70c9292199a79d708982f54d002a35b163ff758 /system/gettext-tiny/msgfmt-exit.patch | |
parent | 85fd60643dcfdcc871af86aaeac45d158466af26 (diff) | |
download | packages-6c3b706e304a6ff23339e3595717d95863474e34.tar.gz packages-6c3b706e304a6ff23339e3595717d95863474e34.tar.bz2 packages-6c3b706e304a6ff23339e3595717d95863474e34.tar.xz packages-6c3b706e304a6ff23339e3595717d95863474e34.zip |
system/gettext-tiny: fix msgfmt exit status when misused
Diffstat (limited to 'system/gettext-tiny/msgfmt-exit.patch')
-rw-r--r-- | system/gettext-tiny/msgfmt-exit.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/system/gettext-tiny/msgfmt-exit.patch b/system/gettext-tiny/msgfmt-exit.patch new file mode 100644 index 000000000..f5ff3fbb8 --- /dev/null +++ b/system/gettext-tiny/msgfmt-exit.patch @@ -0,0 +1,36 @@ +From 0e62c2588742cfffd3dc81c09ecc8488c0ce25b9 Mon Sep 17 00:00:00 2001 +From: Max Rees <maxcrees@me.com> +Date: Sun, 22 Mar 2020 20:20:15 -0500 +Subject: [PATCH] msgfmt: exit(1) if incorrectly used + +This prevents builds from continuing seemingly fine when they are +actually not using this version of msgfmt correctly. +--- + src/msgfmt.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/msgfmt.c b/src/msgfmt.c +index aa16c5e..3de9a56 100644 +--- a/src/msgfmt.c ++++ b/src/msgfmt.c +@@ -278,7 +278,7 @@ void set_file(int out, char* fn, FILE** dest) { + int main(int argc, char**argv) { + if (argc == 1) { + syntax(); +- return 0; ++ return 1; + } + + int arg = 1; +@@ -376,7 +376,7 @@ int main(int argc, char**argv) { + streq(A+1, "D") + ) { + syntax(); +- return 0; ++ return 1; + } else if (streq(A+1, "l")) { + arg++; + locale = A; +-- +2.25.1 + |