vpn: Export vpn_ipconfig_foreach as linker symbol 90/261190/1
authorDaniel Wagner <wagi@monom.org>
Fri, 11 Dec 2020 17:02:41 +0000 (18:02 +0100)
committerNishant Chaprana <n.chaprana@samsung.com>
Tue, 13 Jul 2021 06:20:57 +0000 (11:50 +0530)
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.

Change-Id: I105159739dece4a675fa074ef304c6fd4d7b88bf
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
vpn/plugins/wireguard.c
vpn/vpn-ipconfig.c
vpn/vpn-rtnl.c
vpn/vpn.h

index 7541dd6..ec57c93 100644 (file)
@@ -243,7 +243,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;
index c096fa3..c4fa548 100755 (executable)
@@ -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;
index 6ddfd83..295c05c 100755 (executable)
@@ -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;
 }
index 125450b..e68b8ad 100755 (executable)
--- 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);