Fixed compiler warnings and errors when compiling with MinGW

This commit is contained in:
Mark Pizzolato 2012-12-15 09:41:13 -08:00
parent 06b80cf53c
commit d955c383e9
2 changed files with 5 additions and 3 deletions

View file

@ -1286,6 +1286,7 @@ if ((dwStatus >= ERROR_INVALID_STARTING_CODESEG) && (dwStatus <= ERROR_INFLOOP_I
errno = EINVAL; errno = EINVAL;
} }
#include <winioctl.h> #include <winioctl.h>
#if !defined(__GNUC__)
struct _device_type { struct _device_type {
int32 Type; int32 Type;
char *desc; char *desc;
@ -1376,6 +1377,7 @@ for (i=0; DeviceTypes[i].desc; i++)
return DeviceTypes[i].desc; return DeviceTypes[i].desc;
return "Unknown"; return "Unknown";
} }
#endif
static t_stat sim_os_disk_implemented_raw (void) static t_stat sim_os_disk_implemented_raw (void)
{ {
@ -1526,7 +1528,7 @@ return TRUE;
static t_stat sim_os_disk_info_raw (FILE *Disk, uint32 *sector_size, uint32 *removable) static t_stat sim_os_disk_info_raw (FILE *Disk, uint32 *sector_size, uint32 *removable)
{ {
DWORD IoctlReturnSize; DWORD IoctlReturnSize;
#ifdef IOCTL_STORAGE_GET_DEVICE_NUMBER #if !defined(__GNUC__)
STORAGE_DEVICE_NUMBER Device; STORAGE_DEVICE_NUMBER Device;
ZeroMemory (&Device, sizeof (Device)); ZeroMemory (&Device, sizeof (Device));

View file

@ -164,14 +164,14 @@ static int WSAAPI s_getaddrinfo (const char *hostname,
struct addrinfo **res) struct addrinfo **res)
{ {
struct hostent *he; struct hostent *he;
struct servent *se; struct servent *se = NULL;
struct sockaddr_in *sin; struct sockaddr_in *sin;
struct addrinfo *result = NULL; struct addrinfo *result = NULL;
struct addrinfo *ai, *lai; struct addrinfo *ai, *lai;
struct addrinfo dhints; struct addrinfo dhints;
struct in_addr ipaddr; struct in_addr ipaddr;
struct in_addr *fixed[2]; struct in_addr *fixed[2];
struct in_addr **ips; struct in_addr **ips = NULL;
struct in_addr **ip; struct in_addr **ip;
const char *cname = NULL; const char *cname = NULL;
int port = 0; int port = 0;