From 3e8f0cf1feaeb41da4ca1d96d9afdb16486d0273 Mon Sep 17 00:00:00 2001
From: gcontini <1121667+gcontini@users.noreply.github.com>
Date: 周六, 10 10月 2020 22:53:16 +0800
Subject: [PATCH] added docs for licensing with hardware identifier

---
 src/library/os/network.hpp |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/library/os/network.hpp b/src/library/os/network.hpp
index 5ddf266..fd991d3 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,13 +29,6 @@
 
 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;

--
Gitblit v1.9.1