diff options
author | Biswapriyo Nath <nathbappai@gmail.com> | 2021-09-20 21:32:14 +0530 |
---|---|---|
committer | Biswapriyo Nath <nathbappai@gmail.com> | 2021-09-20 21:34:29 +0530 |
commit | 56dcba411363ff6a163f125c9b8e3a350bbbc130 (patch) | |
tree | 65be97801a6e4b5730828e6cb217dac158fc5027 | |
parent | 62fc8ea38ed3ef1dcfc448e250b10896799d3491 (diff) | |
download | enchant-56dcba411363ff6a163f125c9b8e3a350bbbc130.tar.gz |
voikko: Fix undefined strndup in Win32/MinGW
-rw-r--r-- | providers/enchant_voikko.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/providers/enchant_voikko.c b/providers/enchant_voikko.c index 78ca098..137de8f 100644 --- a/providers/enchant_voikko.c +++ b/providers/enchant_voikko.c @@ -50,7 +50,7 @@ static int voikko_dict_check (EnchantDict * me, const char *const word, size_t len) { - char *word_nul = strndup(word, len); + char *word_nul = g_strndup(word, len); int result = voikkoSpellCstr((struct VoikkoHandle *)me->user_data, word_nul); free(word_nul); if (result == VOIKKO_SPELL_FAILED) @@ -65,7 +65,7 @@ static char ** voikko_dict_suggest (EnchantDict * me, const char *const word, size_t len, size_t * out_n_suggs) { - char *word_nul = strndup(word, len); + char *word_nul = g_strndup(word, len); char **voikko_sugg_arr = voikkoSuggestCstr((struct VoikkoHandle *)me->user_data, word_nul); free(word_nul); if (voikko_sugg_arr == NULL) |