[libvirt] [PATCH] Don't always skip virportallocatortest

Martin Kletzander mkletzan at redhat.com
Mon Mar 3 19:24:26 UTC 2014


On Mon, Mar 03, 2014 at 06:33:19PM +0100, Ján Tomko wrote:
> Include dlfcn.h before checking if RTLD_NEXT is defined
> ---
>  tests/virportallocatortest.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>

ACK

Martin

> diff --git a/tests/virportallocatortest.c b/tests/virportallocatortest.c
> index 5a93dad..fd48c11 100644
> --- a/tests/virportallocatortest.c
> +++ b/tests/virportallocatortest.c
> @@ -23,8 +23,11 @@
>  #include "virfile.h"
>  #include "testutils.h"
>
> -#if HAVE_DLFCN_H && defined(RTLD_NEXT)
> +#if HAVE_DLFCN_H
> +# include <dlfcn.h>
> +#endif
>
> +#if defined(RTLD_NEXT)
>  # ifdef MOCK_HELPER
>  #  include "internal.h"
>  #  include <sys/socket.h>
> @@ -32,7 +35,6 @@
>  #  include <arpa/inet.h>
>  #  include <netinet/in.h>
>  #  include <stdio.h>
> -#  include <dlfcn.h>
>
>  static bool host_has_ipv6 = false;
>  static int (*realsocket)(int domain, int type, int protocol);
> @@ -265,7 +267,7 @@ mymain(void)
>  VIRT_TEST_MAIN_PRELOAD(mymain, abs_builddir "/.libs/libvirportallocatormock.so")
>  # endif
>
> -#else /* ! HAVE_DLFCN_H */
> +#else /* ! defined(RTLD_NEXT) */
>  int
>  main(void)
>  {
> --
> 1.8.3.2
>
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140303/538aa6a3/attachment-0001.sig>


More information about the libvir-list mailing list