diff --git a/sim_disk.c b/sim_disk.c index 16623482..f9a35007 100644 --- a/sim_disk.c +++ b/sim_disk.c @@ -1286,6 +1286,7 @@ if ((dwStatus >= ERROR_INVALID_STARTING_CODESEG) && (dwStatus <= ERROR_INFLOOP_I errno = EINVAL; } #include +#if !defined(__GNUC__) struct _device_type { int32 Type; char *desc; @@ -1376,6 +1377,7 @@ for (i=0; DeviceTypes[i].desc; i++) return DeviceTypes[i].desc; return "Unknown"; } +#endif 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) { DWORD IoctlReturnSize; -#ifdef IOCTL_STORAGE_GET_DEVICE_NUMBER +#if !defined(__GNUC__) STORAGE_DEVICE_NUMBER Device; ZeroMemory (&Device, sizeof (Device)); diff --git a/sim_sock.c b/sim_sock.c index c1c2d511..f2648616 100644 --- a/sim_sock.c +++ b/sim_sock.c @@ -164,14 +164,14 @@ static int WSAAPI s_getaddrinfo (const char *hostname, struct addrinfo **res) { struct hostent *he; -struct servent *se; +struct servent *se = NULL; struct sockaddr_in *sin; struct addrinfo *result = NULL; struct addrinfo *ai, *lai; struct addrinfo dhints; struct in_addr ipaddr; struct in_addr *fixed[2]; -struct in_addr **ips; +struct in_addr **ips = NULL; struct in_addr **ip; const char *cname = NULL; int port = 0;