From 8553a8d63f97cfa8d64b5b2260e81f8c896a8398 Mon Sep 17 00:00:00 2001 From: nancy.liao <huihui.liao@greentest.com.cn> Date: 周五, 23 5月 2025 18:36:03 +0800 Subject: [PATCH] 修改部分因为标准原因的报错 --- src/library/os/network.hpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/library/os/network.hpp b/src/library/os/network.hpp index 33e78b0..4dbc9aa 100644 --- a/src/library/os/network.hpp +++ b/src/library/os/network.hpp @@ -14,7 +14,10 @@ #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 @@ -30,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; -- Gitblit v1.9.1