Commit 95b25140bec7 ("vpn: Add WireGuard support") introduced
a plugin dependency to __vpn_ipconfig_foreach. Because the linker does
not export the prefixed functions, we need to rename it to
vpn_ipconfig_foreach in order to export the linker symbol.
---
vpn/plugins/wireguard.c | 2 +-
vpn/vpn-ipconfig.c | 2 +-
vpn/vpn-rtnl.c | 2 +-
vpn/vpn.h | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/vpn/plugins/wireguard.c b/vpn/plugins/wireguard.c
index a0449b36aa43..0a86acd04a0e 100644
--- a/vpn/plugins/wireguard.c
+++ b/vpn/plugins/wireguard.c
@@ -245,7 +245,7 @@ static char *get_ifname(void)
for (i = 0; i < 256; i++) {
data.ifname = g_strdup_printf("wg%d", i);
data.found = false;
- __vpn_ipconfig_foreach(ifname_check_cb, &data);
+ vpn_ipconfig_foreach(ifname_check_cb, &data);
if (!data.found)
return data.ifname;
diff --git a/vpn/vpn-ipconfig.c b/vpn/vpn-ipconfig.c
index 8b792c1b9929..825b43c40ff5 100644
--- a/vpn/vpn-ipconfig.c
+++ b/vpn/vpn-ipconfig.c
@@ -108,7 +108,7 @@ unsigned int __vpn_ipconfig_get_flags_from_index(int index)
return ipdevice->flags;
}
-void __vpn_ipconfig_foreach(void (*function) (int index,
+void vpn_ipconfig_foreach(void (*function) (int index,
void *user_data), void *user_data)
{
GList *list, *keys;
diff --git a/vpn/vpn-rtnl.c b/vpn/vpn-rtnl.c
index 6ddfd8325252..295c05ce5363 100644
--- a/vpn/vpn-rtnl.c
+++ b/vpn/vpn-rtnl.c
@@ -184,7 +184,7 @@ int vpn_rtnl_register(struct vpn_rtnl *rtnl)
rtnl_list = g_slist_insert_sorted(rtnl_list, rtnl,
compare_priority);
- __vpn_ipconfig_foreach(trigger_rtnl, rtnl);
+ vpn_ipconfig_foreach(trigger_rtnl, rtnl);
return 0;
}
diff --git a/vpn/vpn.h b/vpn/vpn.h
index fa968f602989..477cb2272c11 100644
--- a/vpn/vpn.h
+++ b/vpn/vpn.h
@@ -35,7 +35,7 @@ struct vpn_ipconfig;
struct connman_ipaddress *__vpn_ipconfig_get_address(struct vpn_ipconfig *ipconfig);
unsigned short __vpn_ipconfig_get_type_from_index(int index);
unsigned int __vpn_ipconfig_get_flags_from_index(int index);
-void __vpn_ipconfig_foreach(void (*function) (int index,
+void vpn_ipconfig_foreach(void (*function) (int index,
void *user_data), void *user_data);
void __vpn_ipconfig_set_local(struct vpn_ipconfig *ipconfig,
const char *address);
--
2.29.2
Show replies by date
Thanks :)
On 12/11/20 8:02 PM, Daniel Wagner wrote:
> Commit 95b25140bec7 ("vpn: Add WireGuard support") introduced
> a plugin dependency to __vpn_ipconfig_foreach. Because the linker does
> not export the prefixed functions, we need to rename it to
> vpn_ipconfig_foreach in order to export the linker symbol.
> ---
> vpn/plugins/wireguard.c | 2 +-
> vpn/vpn-ipconfig.c | 2 +-
> vpn/vpn-rtnl.c | 2 +-
> vpn/vpn.h | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/vpn/plugins/wireguard.c b/vpn/plugins/wireguard.c
> index a0449b36aa43..0a86acd04a0e 100644
> --- a/vpn/plugins/wireguard.c
> +++ b/vpn/plugins/wireguard.c
> @@ -245,7 +245,7 @@ static char *get_ifname(void)
> for (i = 0; i < 256; i++) {
> data.ifname = g_strdup_printf("wg%d", i);
> data.found = false;
> - __vpn_ipconfig_foreach(ifname_check_cb, &data);
> + vpn_ipconfig_foreach(ifname_check_cb, &data);
>
> if (!data.found)
> return data.ifname;
> diff --git a/vpn/vpn-ipconfig.c b/vpn/vpn-ipconfig.c
> index 8b792c1b9929..825b43c40ff5 100644
> --- a/vpn/vpn-ipconfig.c
> +++ b/vpn/vpn-ipconfig.c
> @@ -108,7 +108,7 @@ unsigned int __vpn_ipconfig_get_flags_from_index(int index)
> return ipdevice->flags;
> }
>
> -void __vpn_ipconfig_foreach(void (*function) (int index,
> +void vpn_ipconfig_foreach(void (*function) (int index,
> void *user_data), void *user_data)
> {
> GList *list, *keys;
> diff --git a/vpn/vpn-rtnl.c b/vpn/vpn-rtnl.c
> index 6ddfd8325252..295c05ce5363 100644
> --- a/vpn/vpn-rtnl.c
> +++ b/vpn/vpn-rtnl.c
> @@ -184,7 +184,7 @@ int vpn_rtnl_register(struct vpn_rtnl *rtnl)
> rtnl_list = g_slist_insert_sorted(rtnl_list, rtnl,
> compare_priority);
>
> - __vpn_ipconfig_foreach(trigger_rtnl, rtnl);
> + vpn_ipconfig_foreach(trigger_rtnl, rtnl);
>
> return 0;
> }
> diff --git a/vpn/vpn.h b/vpn/vpn.h
> index fa968f602989..477cb2272c11 100644
> --- a/vpn/vpn.h
> +++ b/vpn/vpn.h
> @@ -35,7 +35,7 @@ struct vpn_ipconfig;
> struct connman_ipaddress *__vpn_ipconfig_get_address(struct vpn_ipconfig
*ipconfig);
> unsigned short __vpn_ipconfig_get_type_from_index(int index);
> unsigned int __vpn_ipconfig_get_flags_from_index(int index);
> -void __vpn_ipconfig_foreach(void (*function) (int index,
> +void vpn_ipconfig_foreach(void (*function) (int index,
> void *user_data), void *user_data);
> void __vpn_ipconfig_set_local(struct vpn_ipconfig *ipconfig,
> const char *address);
On Fri, Dec 11, 2020 at 06:02:41PM +0100, Daniel Wagner wrote:
Commit 95b25140bec7 ("vpn: Add WireGuard support")
introduced
a plugin dependency to __vpn_ipconfig_foreach. Because the linker does
not export the prefixed functions, we need to rename it to
vpn_ipconfig_foreach in order to export the linker symbol.
Patch applied.