DISK: Fix MinGW build when compiling under g++
This commit is contained in:
parent
2c16110d94
commit
7a7b4de971
1 changed files with 9 additions and 2 deletions
11
sim_disk.c
11
sim_disk.c
|
@ -1674,6 +1674,15 @@ errno = EINVAL;
|
||||||
#else
|
#else
|
||||||
#include <winioctl.h>
|
#include <winioctl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
WINBASEAPI BOOL WINAPI GetFileSizeEx(HANDLE hFile, PLARGE_INTEGER lpFileSize);
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
struct _device_type {
|
struct _device_type {
|
||||||
int32 Type;
|
int32 Type;
|
||||||
const char *desc;
|
const char *desc;
|
||||||
|
@ -1817,8 +1826,6 @@ static void sim_os_disk_flush_raw (FILE *f)
|
||||||
FlushFileBuffers ((HANDLE)f);
|
FlushFileBuffers ((HANDLE)f);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern WINBASEAPI BOOL WINAPI GetFileSizeEx(HANDLE hFile, PLARGE_INTEGER lpFileSize);
|
|
||||||
|
|
||||||
static t_offset sim_os_disk_size_raw (FILE *Disk)
|
static t_offset sim_os_disk_size_raw (FILE *Disk)
|
||||||
{
|
{
|
||||||
DWORD IoctlReturnSize;
|
DWORD IoctlReturnSize;
|
||||||
|
|
Loading…
Add table
Reference in a new issue