From 56dcba411363ff6a163f125c9b8e3a350bbbc130 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Mon, 20 Sep 2021 21:32:14 +0530 Subject: voikko: Fix undefined strndup in Win32/MinGW --- providers/enchant_voikko.c | 4 ++-- 1 file 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) -- cgit v1.2.1