diff --git a/src/protocol/bittorrent/common.c b/src/protocol/bittorrent/common.c index 11d8555d..ddefa288 100644 --- a/src/protocol/bittorrent/common.c +++ b/src/protocol/bittorrent/common.c @@ -21,6 +21,8 @@ #include "util/string.h" #include "util/snprintf.h" +const bittorrent_id_T BITTORRENT_NULL_ID; + /* Debug function which returns printable peer ID. */ unsigned char * get_peer_id(bittorrent_id_T peer_id) diff --git a/src/protocol/bittorrent/common.h b/src/protocol/bittorrent/common.h index 87915c6c..1108efe3 100644 --- a/src/protocol/bittorrent/common.h +++ b/src/protocol/bittorrent/common.h @@ -45,7 +45,7 @@ struct terminal; typedef sha1_digest_bin_T bittorrent_id_T; /* Special peer ID used for determining whether an ID has been set. */ -const bittorrent_id_T BITTORRENT_NULL_ID; +extern const bittorrent_id_T BITTORRENT_NULL_ID; #define bittorrent_id_is_empty(id) \ (!memcmp(id, BITTORRENT_NULL_ID, sizeof(bittorrent_id_T)))