(svn r5292) -Fix: When using SIOCGIFCONF to detect network interfaces accomodate for the fact that struct sockaddr doesn't have fixed size in all implementations

This commit is contained in:
tron
2006-06-17 08:16:58 +00:00
parent dcfcf7df4a
commit bdf64588d3
2 changed files with 36 additions and 29 deletions

View File

@@ -32,14 +32,12 @@
#define EWOULDBLOCK WSAEWOULDBLOCK
// Windows has some different names for some types..
typedef unsigned long in_addr_t;
typedef INTERFACE_INFO IFREQ;
#endif // WIN32
// UNIX stuff
#if defined(UNIX)
# define SOCKET int
# define INVALID_SOCKET -1
typedef struct ifreq IFREQ;
# if !defined(__MORPHOS__) && !defined(__AMIGA__)
# define ioctlsocket ioctl
# if !defined(BEOS_NET_SERVER)
@@ -100,7 +98,6 @@ typedef struct ifreq IFREQ;
#if defined(__OS2__)
# define SOCKET int
# define INVALID_SOCKET -1
typedef struct ifreq IFREQ;
# define ioctlsocket ioctl
# define closesocket close
# define GET_LAST_ERROR() (sock_errno())