defining stuff in headers confuses the linker
authorHeikki Lindholm <holin@iki.fi>
Fri, 11 Feb 2011 09:30:28 +0000 (09:30 +0000)
committerHeikki Lindholm <holin@iki.fi>
Fri, 11 Feb 2011 09:30:28 +0000 (09:30 +0000)
src/vpn/gnunet-daemon-vpn-dns.c
src/vpn/gnunet-daemon-vpn-dns.h
src/vpn/gnunet-daemon-vpn-helper.c
src/vpn/gnunet-daemon-vpn-helper.h
src/vpn/gnunet-daemon-vpn.c
src/vpn/gnunet-daemon-vpn.h

index 0149f332300a77cf17f9c52a891036d4c2b380bf..7d0b38d8c37122c9e3675135aec6ab65a50f5f31 100644 (file)
 #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
index f72a29ad1f7237d2aa06a0dc2a7ff7d83ee1f2a3..d27599e487109629585bec9bfe12ec10a04dabc7 100644 (file)
 /**
  * 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 */
index 4af04e6cd012335070d50cabe1e7be7bdd6a78b1..a270600145eb11ba7650a288f940ab05e431dc58 100644 (file)
@@ -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
  *
index 17d775b86985fa2d3832d9d5f946db4d5f0d31e5..0933437425737f9b2be2a13c4cc65157a8ac0aac 100644 (file)
@@ -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
index 0c3c137faa95f430d35a30e6b04846bd64474409..32660047d05c2f6736cfd0f168779b96579affb6 100644 (file)
 
 #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.
  */
index 382ac9a720795e0873180fe14b042c9fc7d2157d..b9d6a65ed974c30c0260b6ca118a9be921ad6731 100644 (file)
@@ -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;