summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2011-11-23 19:29:39 +0100
committerVladislav Vaintroub <wlad@montyprogram.com>2011-11-23 19:29:39 +0100
commit74da49894f44a46ba086120bade714a5cc29992a (patch)
tree88eb78017beb9e27c35b7ed2aa6d314a964218d8
parenta0331fecf9c3496c8e1a6eb0f5c0046912c50185 (diff)
downloadmariadb-git-74da49894f44a46ba086120bade714a5cc29992a.tar.gz
fix linking on Windows (iphlpapi missing)
-rw-r--r--mysys/my_gethwaddr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mysys/my_gethwaddr.c b/mysys/my_gethwaddr.c
index 4360daca6f8..21bbdfef997 100644
--- a/mysys/my_gethwaddr.c
+++ b/mysys/my_gethwaddr.c
@@ -129,6 +129,7 @@ err:
#elif defined(_WIN32)
#include <winsock2.h>
#include <iphlpapi.h>
+#pragma comment(lib, "iphlpapi.lib")
#define ETHER_ADDR_LEN 6
@@ -142,7 +143,7 @@ my_bool my_gethwaddr(uchar *to)
if (GetAdaptersInfo(info, &info_len) != ERROR_BUFFER_OVERFLOW)
goto err;
- info= alloca(info_len);
+ info= (IP_ADAPTER_INFO *)alloca(info_len);
if (GetAdaptersInfo(info, &info_len) != NO_ERROR)
goto err;