aboutsummaryrefslogtreecommitdiff
path: root/include/string.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/string.h')
-rw-r--r--include/string.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/string.h b/include/string.h
index a3263e7..c558a90 100644
--- a/include/string.h
+++ b/include/string.h
@@ -50,4 +50,20 @@ void * memmem(const void *big, size_t big_len, const void *little,
50 size_t little_len); 50 size_t little_len);
51#endif 51#endif
52 52
53#ifdef _WIN32
54#include <errno.h>
55
56static inline char *
57posix_strerror(int errnum)
58{
59 if (errnum == ECONNREFUSED) {
60 return "Connection refused";
61 }
62 return strerror(errnum);
63}
64
65#define strerror(errnum) posix_strerror(errnum)
66
67#endif
68
53#endif 69#endif