diff options
author | Danct12 <danct12@disroot.org> | 2019-05-24 13:00:38 +0700 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2019-05-27 15:21:16 +0000 |
commit | 40e661af978de6112ed20962ed3c5e6313e2e2b6 (patch) | |
tree | 68e0077b3cce58cd529a121499d73e9d738cf7a8 /testing/onboard/glibc-musl-error.patch | |
parent | a041d7d34892b0e7646ff867648de9180e5f2014 (diff) | |
download | aports-40e661af978de6112ed20962ed3c5e6313e2e2b6.tar.bz2 aports-40e661af978de6112ed20962ed3c5e6313e2e2b6.tar.xz |
testing/onboard: new aport
Diffstat (limited to 'testing/onboard/glibc-musl-error.patch')
-rw-r--r-- | testing/onboard/glibc-musl-error.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/testing/onboard/glibc-musl-error.patch b/testing/onboard/glibc-musl-error.patch new file mode 100644 index 0000000000..46aba646b2 --- /dev/null +++ b/testing/onboard/glibc-musl-error.patch @@ -0,0 +1,62 @@ +diff --git a/Onboard/pypredict/lm/lm.cpp b/Onboard/pypredict/lm/lm.cpp +index 2e64296..081b3fb 100644 +--- a/Onboard/pypredict/lm/lm.cpp ++++ b/Onboard/pypredict/lm/lm.cpp +@@ -19,7 +19,7 @@ + + #include <stdlib.h> + #include <stdio.h> +-#include <error.h> ++ + #include <algorithm> + #include <cmath> + #include <string> +@@ -37,7 +37,7 @@ StrConv::StrConv() + if (cd_mb_wc == (iconv_t) -1) + { + if (errno == EINVAL) +- error (0, 0, "conversion from UTF-8 to wchar_t not available"); ++ fprintf (stderr, "conversion from UTF-8 to wchar_t not available"); + else + perror ("iconv_open mb2wc"); + } +@@ -45,7 +45,7 @@ StrConv::StrConv() + if (cd_wc_mb == (iconv_t) -1) + { + if (errno == EINVAL) +- error (0, 0, "conversion from wchar_t to UTF-8 not available"); ++ fprintf (stderr, "conversion from wchar_t to UTF-8 not available"); + else + perror ("iconv_open wc2mb"); + } +diff --git a/Onboard/pypredict/lm/lm_dynamic.cpp b/Onboard/pypredict/lm/lm_dynamic.cpp +index 7c62824..da8cfd0 100644 +--- a/Onboard/pypredict/lm/lm_dynamic.cpp ++++ b/Onboard/pypredict/lm/lm_dynamic.cpp +@@ -17,7 +17,7 @@ + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +-#include <error.h> ++ + + #include "lm_dynamic.h" + +@@ -91,7 +91,7 @@ LMError DynamicModelBase::load_arpac(const char* filename) + int ngrams_read = get_num_ngrams(current_level-1); + if (ngrams_read != ngrams_expected) + { +- error (0, 0, "unexpected n-gram count for level %d: " ++ fprintf (stderr, "unexpected n-gram count for level %d: " + "expected %d n-grams, but read %d", + current_level, + ngrams_expected, ngrams_read); +@@ -105,7 +105,7 @@ LMError DynamicModelBase::load_arpac(const char* filename) + if (ntoks < current_level+1) + { + err_code = ERR_NUMTOKENS; // too few tokens for cur. level +- error (0, 0, "too few tokens for n-gram level %d: " ++ fprintf (stderr, "too few tokens for n-gram level %d: " + "line %d, tokens found %d/%d", + current_level, + line_number, ntoks, current_level+1); |