projects
/
oweals
/
tinc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix checks for Cygwin-related macros.
[oweals/tinc.git]
/
src
/
utils.h
diff --git
a/src/utils.h
b/src/utils.h
index fbeae5eb9ae9553f0e7a508dc377b27c5cd5dd48..79520250899fabb3b5d883327396107338128fdb 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)