diff options
author | Matti Virolainen <mvirolai@gmail.com> | 2015-03-06 12:23:14 +0200 |
---|---|---|
committer | Tony Kelman <tony@kelman.net> | 2015-03-06 12:07:54 -0800 |
commit | 78c34af016dc69e7553e671ad3795ffb9dbb93ef (patch) | |
tree | 9a186030adfa6f0ccf7df364c60d37ae1a8b1cc2 | |
parent | 04c5a9c0838a9c44b55afb427169318ec4a44ec2 (diff) | |
download | libgit2-78c34af016dc69e7553e671ad3795ffb9dbb93ef.tar.gz |
Use secure API if available.
-rw-r--r-- | src/win32/posix_w32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/win32/posix_w32.c b/src/win32/posix_w32.c index b8b4f43f8..544b1ebd5 100644 --- a/src/win32/posix_w32.c +++ b/src/win32/posix_w32.c @@ -55,7 +55,7 @@ int p_ftruncate(int fd, git_off_t size) return -1; } -#if !defined(__MINGW32__) +#if !defined(__MINGW32__) || defined(MINGW_HAS_SECURE_API) return ((_chsize_s(fd, size) == 0) ? 0 : -1); #else /* TODO MINGW32 Find a replacement for _chsize() that handles big files. */ |