diff --git a/Source/CTest/Curl/CMake/CurlTests.c b/Source/CTest/Curl/CMake/CurlTests.c index 52547166d..fba8dc42d 100644 --- a/Source/CTest/Curl/CMake/CurlTests.c +++ b/Source/CTest/Curl/CMake/CurlTests.c @@ -412,8 +412,10 @@ int main(void) { return 0; } #endif +#ifdef HAVE_FILE_OFFSET_BITS #ifdef _FILE_OFFSET_BITS #undef _FILE_OFFSET_BITS +#endif #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. diff --git a/Source/CTest/Curl/CMakeLists.txt b/Source/CTest/Curl/CMakeLists.txt index deadb9609..3d2880c29 100644 --- a/Source/CTest/Curl/CMakeLists.txt +++ b/Source/CTest/Curl/CMakeLists.txt @@ -400,10 +400,13 @@ FOREACH(CURL_TEST HAVE_INET_NTOA_R_DECL HAVE_INET_NTOA_R_DECL_REENTRANT HAVE_GETADDRINFO - _FILE_OFFSET_BITS + HAVE_FILE_OFFSET_BITS ) CURL_INTERNAL_TEST(${CURL_TEST}) ENDFOREACH(CURL_TEST) +IF(HAVE_FILE_OFFSET_BITS) + SET(_FILE_OFFSET_BITS 64) +ENDIF(HAVE_FILE_OFFSET_BITS) # Check for reentrant FOREACH(CURL_TEST