projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use inet_pton() to parse Subnets.
[tinc]
/
src
/
utils.h
diff --git
a/src/utils.h
b/src/utils.h
index
fbeae5e
..
7952025
100644
(file)
--- a/
src/utils.h
+++ b/
src/utils.h
@@
-24,8
+24,11
@@
extern bool hex2bin(char *src, char *dst, int length);
extern void bin2hex(char *src, char *dst, int length);
extern bool hex2bin(char *src, char *dst, int length);
extern void bin2hex(char *src, char *dst, int length);
-#if
def HAVE_MINGW
+#if
defined(HAVE_MINGW) || defined(HAVE_CYGWIN)
extern const char *winerror(int);
extern const char *winerror(int);
+#endif
+
+#ifdef HAVE_MINGW
#define strerror(x) ((x)>0?strerror(x):winerror(GetLastError()))
#define sockerrno WSAGetLastError()
#define sockstrerror(x) winerror(x)
#define strerror(x) ((x)>0?strerror(x):winerror(GetLastError()))
#define sockerrno WSAGetLastError()
#define sockstrerror(x) winerror(x)