blob: d40adacf02df71cec9cd7cb69ee57a3484aa2e98 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
From e8db754971e4d896ac4f029b101907ce4641a729 Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Wed, 3 Jun 2020 06:00:04 +0530
Subject: [PATCH 11/22] gsocket: if_nametoindex is not available on WinRT
if_indextoname() is also not available, and since that's the only way
to get interface names on Windows, we can simply disable this code.
---
gio/gsocket.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gio/gsocket.c b/gio/gsocket.c
index 5ef650c..d032cd2 100644
--- a/gio/gsocket.c
+++ b/gio/gsocket.c
@@ -2194,7 +2194,11 @@ g_socket_w32_get_adapter_ipv4_addr (const gchar *name_or_ip)
* function if_nametoindex will return >=1 if a valid index, or 0=no match
* valid index will be used later in GetAdaptersAddress loop for lookup of adapter IP address
*/
+#ifdef G_WINAPI_ONLY_APP
+ if_index = 0;
+#else
if_index = if_nametoindex (name_or_ip);
+#endif
/* Step 3: Prepare wchar string for friendly name comparision */
if (if_index == 0)
--
2.27.0.windows.1
|