From 601c099d1d3650a0153cd8bfb6a608dd0044dc97 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 14 Apr 2026 14:18:49 +0300 Subject: [PATCH] ; Fix MinGW64 build due to missing 'getdelim' prototype * src/conf_post.h [WINDOWSNT]: Add prototype for 'getdelim'. Reported by Angelo Graziosi . --- src/conf_post.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/conf_post.h b/src/conf_post.h index f2cd8d6b04e..78b542d69d3 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -425,3 +425,11 @@ extern int gl_consolesafe_vprintf (const char *restrict format, va_list args) # define vprintf gl_consolesafe_vprintf # endif /* !_UCRT */ #endif /* WINDOWSNT */ + +#if defined WINDOWSNT && !defined HAVE_DECL_GETDELIM +/* MinGW64 doesn't have getdelim, called by Gnulib's getline, but the + MS-Windows build omits stdio.h module, where getdelim is declared. */ +# include +# include +extern ssize_t getdelim (char **, size_t *, int, FILE *); +#endif