1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-20 02:42:09 +03:00

build: set _FILE_OFFSET_BITS=64 for mingw-w64 (#821)

autotools builds already did auto-detect and set this mingw-specific
macro, but CMake and GNU Make builds did not. This patch fixes that.

Necessary for `src/scp.c`.
This commit is contained in:
Viktor Szakats
2023-03-08 16:18:44 +01:00
committed by GitHub
parent 07a8b8e033
commit 7cce783081

View File

@@ -44,9 +44,21 @@
#pragma warning(disable:4127) #pragma warning(disable:4127)
#endif #endif
/* Define mingw-w64 version macros, eg __MINGW{32,64}_{MINOR,MAJOR}_VERSION */
#ifdef __MINGW32__
#include <_mingw.h>
#endif
#define LIBSSH2_LIBRARY #define LIBSSH2_LIBRARY
#include "libssh2_config.h" #include "libssh2_config.h"
/* Number of bits in a file offset, on hosts where this is settable. */
#if defined(__MINGW32__) && defined(__MINGW64_VERSION_MAJOR)
# ifndef _FILE_OFFSET_BITS
# define _FILE_OFFSET_BITS 64
# endif
#endif
#ifdef WIN32 #ifdef WIN32
#ifndef WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN