diff options
Diffstat (limited to 'src/win32/posix.h')
-rw-r--r-- | src/win32/posix.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/win32/posix.h b/src/win32/posix.h index 7f9d57cc3..2cbea1807 100644 --- a/src/win32/posix.h +++ b/src/win32/posix.h @@ -19,6 +19,12 @@ # define EAFNOSUPPORT (INT_MAX-1) #endif +#ifdef _MSC_VER +# define p_ftruncate(fd, sz) _chsize_s(fd, sz) +#else /* MinGW */ +# define p_ftruncate(fd, sz) _chsize(fd, sz) +#endif + GIT_INLINE(int) p_link(const char *old, const char *new) { GIT_UNUSED(old); |