Fork 0

Define BITTORRENT_NULL_ID in common.c; declare extern in common.h.

This change avoids linker warnings when building with Debian tcc
0.9.23-4 + patch from Debian bug 418360:

      [LD]   src/protocol/bittorrent/lib.o
bittorrent.o: 'BITTORRENT_NULL_ID' defined twice
common.o: 'BITTORRENT_NULL_ID' defined twice
connection.o: 'BITTORRENT_NULL_ID' defined twice
dialogs.o: 'BITTORRENT_NULL_ID' defined twice
peerconnect.o: 'BITTORRENT_NULL_ID' defined twice
peerwire.o: 'BITTORRENT_NULL_ID' defined twice
piececache.o: 'BITTORRENT_NULL_ID' defined twice
tracker.o: 'BITTORRENT_NULL_ID' defined twice
This commit is contained in:
Kalle Olavi Niemitalo 2007-07-09 13:44:57 +03:00 committed by Kalle Olavi Niemitalo
parent 30a502cb8c
commit 028145ac10
2 changed files with 3 additions and 1 deletions

View File

@ -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)

View File

@ -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)))