]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Don't always skip virportallocatortest
authorJán Tomko <jtomko@redhat.com>
Mon, 3 Mar 2014 17:29:28 +0000 (18:29 +0100)
committerJán Tomko <jtomko@redhat.com>
Tue, 4 Mar 2014 08:14:52 +0000 (09:14 +0100)
Include dlfcn.h before checking if RTLD_NEXT is defined

tests/virportallocatortest.c

index 5a93dad3fbbadff77fdf7ad5b73ce51b793ea227..fd48c1137dbc014b0d2482549aefde65c34f3341 100644 (file)
 #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)
 {