[PATCH 1/2] tests: Use plain close() in mock code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/virportallocatortest.c b/tests/virportallocatortest.c
index 58b2155..077aad8 100644
--- a/tests/virportallocatortest.c
+++ b/tests/virportallocatortest.c
@@ -58,7 +58,7 @@ static void init_syms(void)
         return;
 
     host_has_ipv6 = true;
-    VIR_FORCE_CLOSE(fd);
+    close(fd);
 }
 
 int socket(int domain,
-- 
2.5.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]