nancy.liao
2025-05-23 8553a8d63f97cfa8d64b5b2260e81f8c896a8398
src/library/os/network.hpp
@@ -9,10 +9,15 @@
#define SRC_LIBRARY_OS_NETWORK_HPP_
#include <stdlib.h>
#include <vector>
#ifdef __unix__
#include <netdb.h>
#define LCC_ADAPTER_DESCRIPTION_LEN NI_MAXHOST
#else
//mingw cross compile for Windows
#ifdef _MSC_VER
#include <Windows.h>
#endif
#include <iphlpapi.h>
#define LCC_ADAPTER_DESCRIPTION_LEN MAX_ADAPTER_DESCRIPTION_LENGTH
#endif
@@ -28,7 +33,7 @@
typedef struct {
   int id;
   char description[LCC_ADAPTER_DESCRIPTION_LEN + 1];
   unsigned char mac_address[8];
   unsigned char mac_address[6];
   unsigned char ipv4_address[4];
   IFACE_TYPE type;
} OsAdapterInfo;