1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

Fix function name collision with OpenSSL library

* src/utils.[ch], src/http.c, src/metalink.c: Rename function
    hex_to_string() to wg_hex_to_string sine it collides with a
    similarly named function in OpenSSL Library.
This commit is contained in:
Darshit Shah 2015-07-24 23:52:43 +05:30
parent 595f219a17
commit 4e56a91001
4 changed files with 4 additions and 4 deletions

View File

@ -2813,7 +2813,7 @@ metalink_from_http (const struct response *resp, const struct http_stat *hs,
mfile->checksums[hash_count]->type = dig_type; mfile->checksums[hash_count]->type = dig_type;
mfile->checksums[hash_count]->hash = xmalloc (hash_bin_len * 2 + 1); mfile->checksums[hash_count]->hash = xmalloc (hash_bin_len * 2 + 1);
hex_to_string (mfile->checksums[hash_count]->hash, bin_hash, hash_bin_len); wg_hex_to_string (mfile->checksums[hash_count]->hash, bin_hash, hash_bin_len);
xfree (dig_hash); xfree (dig_hash);

View File

@ -195,7 +195,7 @@ retrieve_from_metalink (const metalink_t* metalink)
quote (mfile->name)); quote (mfile->name));
sha256_stream (local_file, sha256); sha256_stream (local_file, sha256);
hex_to_string (sha256_txt, sha256, SHA256_DIGEST_SIZE); wg_hex_to_string (sha256_txt, sha256, SHA256_DIGEST_SIZE);
DEBUGP (("Declared hash: %s\n", mchksum->hash)); DEBUGP (("Declared hash: %s\n", mchksum->hash));
DEBUGP (("Computed hash: %s\n", sha256_txt)); DEBUGP (("Computed hash: %s\n", sha256_txt));
if (!strcmp (sha256_txt, mchksum->hash)) if (!strcmp (sha256_txt, mchksum->hash))

View File

@ -2507,7 +2507,7 @@ get_max_length (const char *path, int length, int name)
} }
void void
hex_to_string (char *str_buffer, const char *hex_buffer, size_t hex_len) wg_hex_to_string (char *str_buffer, const char *hex_buffer, size_t hex_len)
{ {
size_t i; size_t i;

View File

@ -157,7 +157,7 @@ long get_max_length (const char *path, int length, int name);
size_t strlcpy (char *dst, const char *src, size_t size); size_t strlcpy (char *dst, const char *src, size_t size);
#endif #endif
void hex_to_string (char *str_buffer, const char *hex_buffer, size_t hex_len); void wg_hex_to_string (char *str_buffer, const char *hex_buffer, size_t hex_len);
extern unsigned char char_prop[]; extern unsigned char char_prop[];