From 4e56a910013de2b7dcd378a97ad63be4c8fa53c4 Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Fri, 24 Jul 2015 23:52:43 +0530 Subject: [PATCH] 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. --- src/http.c | 2 +- src/metalink.c | 2 +- src/utils.c | 2 +- src/utils.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/http.c b/src/http.c index 1e6f8003..834f59d7 100644 --- a/src/http.c +++ b/src/http.c @@ -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]->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); diff --git a/src/metalink.c b/src/metalink.c index f5ae1c19..6e959a26 100644 --- a/src/metalink.c +++ b/src/metalink.c @@ -195,7 +195,7 @@ retrieve_from_metalink (const metalink_t* metalink) quote (mfile->name)); 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 (("Computed hash: %s\n", sha256_txt)); if (!strcmp (sha256_txt, mchksum->hash)) diff --git a/src/utils.c b/src/utils.c index 4da45a13..52228516 100644 --- a/src/utils.c +++ b/src/utils.c @@ -2507,7 +2507,7 @@ get_max_length (const char *path, int length, int name) } 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; diff --git a/src/utils.h b/src/utils.h index b5375e31..76f4f8d2 100644 --- a/src/utils.h +++ b/src/utils.h @@ -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); #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[];