]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: Use plain close() in mock code
authorAndrea Bolognani <abologna@redhat.com>
Thu, 11 Feb 2016 10:33:45 +0000 (11:33 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Thu, 11 Feb 2016 11:33:43 +0000 (12:33 +0100)
The virportallocatortest.c file is compiled both as a test case
and as a mock library; in the latter case, it can't use
VIR_FORCE_CLOSE() because mock libraries are not linked against
libvirt.

Replace VIR_FORCE_CLOSE() with plain close() to solve the issue.

tests/virportallocatortest.c

index 58b2155994f9eaac93bd79f9c21b6e0b10f01b8a..077aad8542fc6720dfba8d16d0aaae27c5f2a7ea 100644 (file)
@@ -58,7 +58,7 @@ static void init_syms(void)
         return;
 
     host_has_ipv6 = true;
-    VIR_FORCE_CLOSE(fd);
+    close(fd);
 }
 
 int socket(int domain,