X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=lib%2Futils.h;h=af65427420166db47e0155698b47029e4094f68e;hp=d8dc4768d609a3b589e1d03149b74fa1d8b17c46;hb=b0825f36b7b5dade1693fdbddfec7eef3f5ed86f;hpb=6f3099595530280028f6ec3d0b310df523e75f98 diff --git a/lib/utils.h b/lib/utils.h index d8dc4768..af654274 100644 --- a/lib/utils.h +++ b/lib/utils.h @@ -40,6 +40,7 @@ extern void bin2hex(char *src, char *dst, int length); #ifdef HAVE_MINGW extern char *winerror(int); +#define strerror(x) (x>0?strerror(x):winerror(GetLastError())) #endif #endif /* __TINC_UTILS_H__ */