mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
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:
parent
30a502cb8c
commit
028145ac10
@ -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)
|
||||
|
@ -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)))
|
||||
|
Loading…
Reference in New Issue
Block a user