]> git.meshlink.io Git - catta/blobdiff - src/internal.h
use WSAGetlastError/FormatMessage in place of strerror(errno) on Windows
[catta] / src / internal.h
index 6c602d7deb3deb33eeaa41f27a3981d76800b893..d38c1a317de0753cc366be30cf8143cd8ca91eb8 100644 (file)
@@ -48,6 +48,13 @@ typedef struct CattaEntry CattaEntry;
 #define CATTA_RR_HOLDOFF_MSEC_RATE_LIMIT 20000
 #define CATTA_RR_RATE_LIMIT_COUNT 15
 
+#ifndef _WIN32
+#define closesocket close
+#define winsock_init()
+#define winsock_exit()
+#define errnostrsocket() strerror(errno)
+#endif
+
 typedef struct CattaLegacyUnicastReflectSlot CattaLegacyUnicastReflectSlot;
 
 struct CattaLegacyUnicastReflectSlot {