try fix windows build error

This commit is contained in:
xiongguangjie 2022-06-04 14:05:51 +08:00
parent 9a57353470
commit 086146a344

View File

@ -1,6 +1,16 @@
 
#include "sys/socket.h" #if defined(_WIN32)
#include "netdb.h" #include <winsock2.h>
#include <ws2tcpip.h>
#include <Iphlpapi.h>
#pragma comment (lib, "Ws2_32.lib")
#pragma comment(lib,"Iphlpapi.lib")
#else
#include <sys/socket.h>
#include <netdb.h>
#endif // defined(_WIN32)
#include <atomic> #include <atomic>
#include "Util/logger.h" #include "Util/logger.h"