From 4f316230fd7dab9fba2518df2529204302e193eb Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 27 Mar 2026 16:16:56 +0100 Subject: [PATCH] tool_util: fix the ftruncate use for DJGPP Follow-up to 6041b9b11b904c64305eb6c3f4 Since we define ftruncate as a macro, we can't use the macro within the function! Closes #21125 --- src/tool_util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tool_util.c b/src/tool_util.c index 08fb39706a..ce235e3bd8 100644 --- a/src/tool_util.c +++ b/src/tool_util.c @@ -105,7 +105,8 @@ int msdos_ftruncate(int fd, curl_off_t where) if(where > INT_MAX) return -1; - return ftruncate(fd, (off_t) where); + /* avoid using the macro for this */ + return (ftruncate)(fd, (off_t) where); } #endif /* USE_MSDOS_FTRUNCATE */