From a39e5bfb9688f3eaab14272ba81ba78f7794f0d3 Mon Sep 17 00:00:00 2001 From: Marc Hoersken Date: Sat, 7 Mar 2020 10:59:27 +0100 Subject: seek: fix fallback for missing ftruncate on Windows This fixes test 198 on versions of MinGW-w64 without ftruncate Reviewed-By: Daniel Stenberg Reviewed-By: Marcel Raad Closes #5055 --- src/tool_cb_see.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/tool_cb_see.h') diff --git a/src/tool_cb_see.h b/src/tool_cb_see.h index fed8bbf8d..18ab02be4 100644 --- a/src/tool_cb_see.h +++ b/src/tool_cb_see.h @@ -23,18 +23,17 @@ ***************************************************************************/ #include "tool_setup.h" -#if defined(WIN32) && !defined(__MINGW64__) +#if defined(WIN32) && !defined(HAVE_FTRUNCATE) int tool_ftruncate64(int fd, curl_off_t where); #undef ftruncate #define ftruncate(fd,where) tool_ftruncate64(fd,where) -#ifndef HAVE_FTRUNCATE -# define HAVE_FTRUNCATE 1 -#endif +#define HAVE_FTRUNCATE 1 +#define USE_TOOL_FTRUNCATE 1 -#endif /* WIN32 && ! __MINGW64__ */ +#endif /* WIN32 && ! HAVE_FTRUNCATE */ /* ** callback for CURLOPT_SEEKFUNCTION -- cgit v1.2.3