X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Futils.h;h=79520250899fabb3b5d883327396107338128fdb;hp=fbeae5eb9ae9553f0e7a508dc377b27c5cd5dd48;hb=d964d84662b73e351b71905a3c743b666a42aa1d;hpb=3fae14fae5a347823679ef694ab630b4991a201d diff --git a/src/utils.h b/src/utils.h index fbeae5eb..79520250 100644 --- 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); -#ifdef HAVE_MINGW +#if defined(HAVE_MINGW) || defined(HAVE_CYGWIN) 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)