[PATCH 2/2] virutil: fix MinGW build

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

 



Commit b38da584 introduced two new functions to get a page size but it
won't work on Windows. We should take care of this.

Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/util/virutil.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/util/virutil.c b/src/util/virutil.c
index c905209..06e608d 100644
--- a/src/util/virutil.c
+++ b/src/util/virutil.c
@@ -2578,10 +2578,18 @@ virGetListenFDs(void)
 
 #endif /* WIN32 */
 
+#ifndef WIN32
 long virGetSystemPageSize(void)
 {
     return sysconf(_SC_PAGESIZE);
 }
+#else /* WIN32 */
+long virGetSystemPageSize(void)
+{
+    virReportSystemError(ENOSYS, "%s", _("Not supported on this platform"));
+    return -1;
+}
+#endif /* WIN32 */
 
 long virGetSystemPageSizeKB(void)
 {
-- 
2.0.5

--
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]