Browse Source

luasocket: restore code to compile unix sockets on windows.

Sasha Szpakowski 1 year ago
parent
commit
bb7312e057

+ 4 - 0
src/libraries/luasocket/libluasocket/unixdgram.c

@@ -12,7 +12,11 @@
 #include <string.h>
 #include <stdlib.h>
 
+#ifdef _WIN32
+#include <afunix.h>
+#else
 #include <sys/un.h>
+#endif
 
 #define UNIXDGRAM_DATAGRAMSIZE 8192
 

+ 5 - 0
src/libraries/luasocket/libluasocket/unixstream.c

@@ -10,7 +10,12 @@
 #include "unixstream.h"
 
 #include <string.h>
+
+#ifdef _WIN32
+#include <afunix.h>
+#else
 #include <sys/un.h>
+#endif
 
 /*=========================================================================*\
 * Internal function prototypes