From: Heikki Lindholm Date: Fri, 11 Feb 2011 09:30:28 +0000 (+0000) Subject: defining stuff in headers confuses the linker X-Git-Tag: initial-import-from-subversion-38251~19141 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cf31c88fa64fb9bbe02478cf5adc179af4e9d725;p=oweals%2Fgnunet.git defining stuff in headers confuses the linker --- diff --git a/src/vpn/gnunet-daemon-vpn-dns.c b/src/vpn/gnunet-daemon-vpn-dns.c index 0149f3323..7d0b38d8c 100644 --- a/src/vpn/gnunet-daemon-vpn-dns.c +++ b/src/vpn/gnunet-daemon-vpn-dns.c @@ -39,6 +39,13 @@ #include "gnunet-service-dns-p.h" #include "gnunet-vpn-packet.h" +struct query_packet_list *head; +struct query_packet_list *tail; +struct GNUNET_CLIENT_Connection *dns_connection; +unsigned char restart_hijack; +struct answer_packet_list *answer_proc_head; +struct answer_packet_list *answer_proc_tail; + /** * Callback called by notify_transmit_ready; sends dns-queries or rehijack-messages * to the service-dns diff --git a/src/vpn/gnunet-daemon-vpn-dns.h b/src/vpn/gnunet-daemon-vpn-dns.h index f72a29ad1..d27599e48 100644 --- a/src/vpn/gnunet-daemon-vpn-dns.h +++ b/src/vpn/gnunet-daemon-vpn-dns.h @@ -29,12 +29,12 @@ /** * a list of outgoing dns-query-packets */ -struct query_packet_list *head; +extern struct query_packet_list *head; /** * The last element of the list of outgoing dns-query-packets */ -struct query_packet_list *tail; +extern struct query_packet_list *tail; /** * Callback called by notify_transmit_ready; sends dns-queries or rehijack-messages @@ -57,7 +57,7 @@ void dns_answer_handler(void* cls, const struct GNUNET_MessageHeader *msg); /** * The connection to the service-dns */ -struct GNUNET_CLIENT_Connection *dns_connection; +extern struct GNUNET_CLIENT_Connection *dns_connection; /** * A flag to show that the service-dns has to rehijack the outbound dns-packets @@ -65,7 +65,7 @@ struct GNUNET_CLIENT_Connection *dns_connection; * This gets set when the helper restarts as the routing-tables are flushed when * the interface vanishes. */ -unsigned char restart_hijack; +extern unsigned char restart_hijack; /** * A list of processed dns-responses. @@ -73,11 +73,11 @@ unsigned char restart_hijack; * "processed" means that the packet is complete and can be sent out via udp * directly */ -struct answer_packet_list *answer_proc_head; +extern struct answer_packet_list *answer_proc_head; /** * The last element of the list of processed dns-responses. */ -struct answer_packet_list *answer_proc_tail; +extern struct answer_packet_list *answer_proc_tail; #endif /* end of include guard: GNUNET-DAEMON-VPN-DNS_H */ diff --git a/src/vpn/gnunet-daemon-vpn-helper.c b/src/vpn/gnunet-daemon-vpn-helper.c index 4af04e6cd..a27060014 100644 --- a/src/vpn/gnunet-daemon-vpn-helper.c +++ b/src/vpn/gnunet-daemon-vpn-helper.c @@ -40,6 +40,8 @@ #include "gnunet-service-dns-p.h" #include "gnunet-vpn-packet.h" +struct GNUNET_VPN_HELPER_Handle *helper_handle; + /** * Start the helper-process * diff --git a/src/vpn/gnunet-daemon-vpn-helper.h b/src/vpn/gnunet-daemon-vpn-helper.h index 17d775b86..093343742 100644 --- a/src/vpn/gnunet-daemon-vpn-helper.h +++ b/src/vpn/gnunet-daemon-vpn-helper.h @@ -31,7 +31,7 @@ /** * Handle to the helper. contains filedescriptors and such */ -struct GNUNET_VPN_HELPER_Handle *helper_handle; +extern struct GNUNET_VPN_HELPER_Handle *helper_handle; /** * Start the helper-process diff --git a/src/vpn/gnunet-daemon-vpn.c b/src/vpn/gnunet-daemon-vpn.c index 0c3c137fa..32660047d 100644 --- a/src/vpn/gnunet-daemon-vpn.c +++ b/src/vpn/gnunet-daemon-vpn.c @@ -40,6 +40,10 @@ #include "gnunet-daemon-vpn.h" +const struct GNUNET_CONFIGURATION_Handle *cfg; +struct GNUNET_MESH_Handle *mesh_handle; +struct GNUNET_CONTAINER_MultiHashMap* hashmap; + /** * Final status code. */ diff --git a/src/vpn/gnunet-daemon-vpn.h b/src/vpn/gnunet-daemon-vpn.h index 382ac9a72..b9d6a65ed 100644 --- a/src/vpn/gnunet-daemon-vpn.h +++ b/src/vpn/gnunet-daemon-vpn.h @@ -62,17 +62,17 @@ send_udp_to_peer (void *cls, /** * The configuration to use */ -const struct GNUNET_CONFIGURATION_Handle *cfg; +extern const struct GNUNET_CONFIGURATION_Handle *cfg; /** * The handle to mesh */ -struct GNUNET_MESH_Handle *mesh_handle; +extern struct GNUNET_MESH_Handle *mesh_handle; /** * The hashmap containing the mappings from ipv6-addresses to gnunet-descriptors */ -struct GNUNET_CONTAINER_MultiHashMap* hashmap; +extern struct GNUNET_CONTAINER_MultiHashMap* hashmap; struct map_entry { struct GNUNET_vpn_service_descriptor desc;