win32_io.c: switch to _get_osfhandle from get_osfhandle
_get_osfhandle is what is documented. The alternative might have been removed. Fixes linker error: /cygdrive/e/Documents/Programs/ntfs-3g/libntfs-3g/win32_io.c:1990:(.text+0x21a5): undefined reference to `get_osfhandle' /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: .libs/libntfs_3g_la-win32_io.o: in function `ntfs_win32_ftruncate': /cygdrive/e/Documents/Programs/ntfs-3g/libntfs-3g/win32_io.c:2054:(.text+0x223a): undefined reference to `get_osfhandle'pull/106/head
parent
64f3464378
commit
6261aa3c0c
|
@ -180,7 +180,7 @@ typedef unsigned long long ULONG_PTR; /* an integer the same size as a pointer *
|
|||
typedef unsigned long ULONG_PTR; /* an integer the same size as a pointer */
|
||||
#endif
|
||||
|
||||
HANDLE get_osfhandle(int); /* from msvcrt.dll */
|
||||
HANDLE _get_osfhandle(int); /* from msvcrt.dll */
|
||||
|
||||
/*
|
||||
* A few needed definitions not included in <windows.h>
|
||||
|
@ -1987,7 +1987,7 @@ int ntfs_win32_set_sparse(int fd)
|
|||
HANDLE handle;
|
||||
DWORD bytes;
|
||||
|
||||
handle = get_osfhandle(fd);
|
||||
handle = _get_osfhandle(fd);
|
||||
if (handle == INVALID_HANDLE_VALUE)
|
||||
ok = FALSE;
|
||||
else
|
||||
|
@ -2051,7 +2051,7 @@ int ntfs_win32_ftruncate(int fd, s64 size)
|
|||
int ret;
|
||||
HANDLE handle;
|
||||
|
||||
handle = get_osfhandle(fd);
|
||||
handle = _get_osfhandle(fd);
|
||||
ret = win32_ftruncate(handle, size);
|
||||
return (ret);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue