From 8d405b265285c368df2e9cf1c14acee7532e0ee7 Mon Sep 17 00:00:00 2001
From: nancy.liao <huihui.liao@greentest.com.cn>
Date: 摹曛, 29 5月 2025 18:14:38 +0800
Subject: [PATCH] Merge branch 'develop' of http://139.9.88.116:3000/r/module/open-license-manager into develop

---
 src/library/os/network.hpp |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/library/os/network.hpp b/src/library/os/network.hpp
index 5ddf266..4dbc9aa 100644
--- a/src/library/os/network.hpp
+++ b/src/library/os/network.hpp
@@ -10,6 +10,18 @@
 #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
+
 #include "../base/base.h"
 
 namespace license {
@@ -17,18 +29,11 @@
 
 typedef enum { IFACE_TYPE_ETHERNET, IFACE_TYPE_WIRELESS } IFACE_TYPE;
 
-#ifdef __unix__
-#include <netdb.h>
-#define LCC_ADAPTER_DESCRIPTION_LEN NI_MAXHOST
-#else
-#include <iphlpapi.h>
-#define LCC_ADAPTER_DESCRIPTION_LEN MAX_ADAPTER_DESCRIPTION_LENGTH
-#endif
 
 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