I just came across the same issue when trying to test the code. I've locally renamed the function to `wg_hex_to_string`. I'll push the patch to master right away so that builds stop failing.
On Fri, Jul 24, 2015 at 10:51 PM, Ander Juaristi <ajuari...@gmx.es> wrote: > Hi, > > I don't know if I should awake this thread, but anyway. > > Wget fails to build (at least for me) when using OpenSSL as the backend: > > $ ./configure --with-ssl=openssl > $ make > <output trimmed> > In file included from openssl.c:49:0: > utils.h:160:6: error: conflicting types for 'hex_to_string' > void hex_to_string (char *str_buffer, const char *hex_buffer, size_t > hex_len); > ^ > In file included from openssl.c:40:0: > /usr/include/openssl/x509v3.h:666:7: note: previous declaration of > 'hex_to_string' was here > char *hex_to_string(const unsigned char *buffer, long len); > ^ > make[3]: *** [openssl.o] Error 1 > make[3]: Leaving directory `/home/strunk/codebase/c/wget/src' > make[2]: *** [all] Error 2 > make[2]: Leaving directory `/home/strunk/codebase/c/wget/src' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/home/strunk/codebase/c/wget' > make: *** [all] Error 2 > > The problem arises from a conflict between two functions named the same: > 'hex_to_string'. Hubert introduced a new function called 'hex_to_string' in > commit 37b58e3976c02acc90f86e0f65e19b14e2ea9269 ("Metalink support"). But > there's already a function with the same name declared in > <openssl/x509v3.h>: > > char *hex_to_string(const unsigned char *buffer, long len); > > I haven't seen anyone discussed anything similar in this thread, and hence I > decided to report it. How about renaming the function to 'hex2string', or > 'wget_hex_to_string'? > > On 07/20/2015 05:13 PM, Giuseppe Scrivano wrote: > >> Hubert Tarasiuk <hubert.taras...@gmail.com> writes: >> >>> W dniu 04.07.2015 o 00:15, Anthony Bryan pisze: >>>>> >>>>> >>>>> Of course it works for me, but we are not talking about me :-) >>>>> >>>>> The main question is: what does the typical wget user expect ? >>>>> I would thinks (s)he expects the download of the file described by the >>>>> .metalink file. Of course a few users really want to have only the >>>>> .metalink >>>>> file (for testing/inspection). So there should be a possibility to do >>>>> exactly >>>>> that (e.g. --keep-metalink). >>>>> >>>>> Before making any decision/action we should wait for some other voices. >>>> >>>> >>>> I'm not sure what the typical wget user expects, but here are some >>>> examples. >>>> >>>> if you keep the current behavior, it might be helpful to print to the >>>> user that they've downloaded a metalink, and how to make wget use it. >>>> >>>> aria2 (another command line metalink downloader) uses these commands >>>> to download the metalink and process it (download the file described >>>> by it & do a hash check) by default. you have to specify >>>> '--follow-metalink=false' to only download the metalink XML file. >>> >>> I like that option. >>> >>> Also, I am including the amended patches. There was an issue with >>> freeing memory when the Metalink parsing failed (I have moved the >>> metalink_delete call from outside to inside of the 'else' block in >>> main.c:1806). >> >> >> pushed! >> >> Giuseppe >> > > -- > Regards, > - AJ > -- Thanking You, Darshit Shah