Browse Source

fix build error if ENABLE_UDS on windows (#417)

Co-authored-by: yuze <yuze@nextas.com>
alan0526 2 năm trước cách đây
mục cha
commit
95e93e3299
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      base/hsocket.h

+ 4 - 0
base/hsocket.h

@@ -5,8 +5,12 @@
 #include "hplatform.h"
 
 #ifdef ENABLE_UDS
+#ifdef OS_WIN
+    #include <afunix.h> // import struct sockaddr_un
+#else
     #include <sys/un.h> // import struct sockaddr_un
 #endif
+#endif
 
 #ifdef _MSC_VER
 #pragma comment(lib, "ws2_32.lib")