瀏覽代碼

fix build error if ENABLE_UDS on windows (#417)

Co-authored-by: yuze <yuze@nextas.com>
alan0526 2 年之前
父節點
當前提交
95e93e3299
共有 1 個文件被更改,包括 4 次插入0 次删除
  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")