Make sure the 1.1 branch compiles in a MinGW environment.

UNIX domain sockets, of course, don't exist on Windows. For now, when compiling
tinc in a MinGW environment, try to use a TCP socket bound to localhost as an
alternative.
This commit is contained in:
Guus Sliepen 2009-11-05 23:29:28 +01:00
parent 08615e420b
commit 075264a9e1
7 changed files with 95 additions and 25 deletions

View file

@ -32,12 +32,14 @@ extern const char *winerror(int);
#define sockwouldblock(x) ((x) == WSAEWOULDBLOCK || (x) == WSAEINTR)
#define sockmsgsize(x) ((x) == WSAEMSGSIZE)
#define sockinprogress(x) ((x) == WSAEINPROGRESS || (x) == WSAEWOULDBLOCK)
#define sockinuse(x) ((x) == WSAEADDRINUSE)
#else
#define sockerrno errno
#define sockstrerror(x) strerror(x)
#define sockwouldblock(x) ((x) == EWOULDBLOCK || (x) == EINTR)
#define sockmsgsize(x) ((x) == EMSGSIZE)
#define sockinprogress(x) ((x) == EINPROGRESS)
#define sockinuse(x) ((x) == EADDRINUSE)
#endif
extern unsigned int bitfield_to_int(void *bitfield, size_t size);