cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] tests: fix hostname faker

From: Peter Wu <peter_at_lekensteyn.nl>
Date: Thu, 06 Nov 2014 01:17:38 +0100

Please drop this patch, I will send a new patchset where the subject is slightly
more useful.

Peter

On Wednesday 05 November 2014 19:24:05 Peter Wu wrote:
> I noticed that a patched cmake build would pass tests with a fake local
> hostname, but the autotools build skips them:
>
> got unexpected host name back, LD_PRELOAD failed
>
> It turns out that -fvisibility=hidden hides the symbol, and since the
> tests are not part of libcurl, it fails too. Just remove the LIBCURL
> guard.
>
> Broken since cURL 7.30 (commit 83a42ee20ea7fc25abb61c0b7ef56ebe712d7093,
> "curl.h: stricter CURL_EXTERN linkage decorations logic").
>
> Signed-off-by: Peter Wu <peter_at_lekensteyn.nl>
> ---
> tests/libtest/sethostname.h | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/tests/libtest/sethostname.h b/tests/libtest/sethostname.h
> index 192f037..032eaa0 100644
> --- a/tests/libtest/sethostname.h
> +++ b/tests/libtest/sethostname.h
> @@ -23,12 +23,8 @@
> #ifdef CURL_STATICLIB
> # define LIBHOSTNAME_EXTERN
> #elif defined(WIN32) || defined(__SYMBIAN32__)
> -# if defined(BUILDING_LIBCURL)
> -# define LIBHOSTNAME_EXTERN __declspec(dllexport)
> -# else
> -# define LIBHOSTNAME_EXTERN __declspec(dllimport)
> -# endif
> -#elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS)
> +# define LIBHOSTNAME_EXTERN __declspec(dllexport)
> +#elif defined(CURL_HIDDEN_SYMBOLS)
> # define LIBHOSTNAME_EXTERN CURL_EXTERN_SYMBOL
> #else
> # define LIBHOSTNAME_EXTERN
>

-- 
Kind regards,
Peter
https://lekensteyn.nl
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-11-06