]> xenbits.xensource.com Git - libvirt.git/commitdiff
virutil: fix MinGW build
authorPavel Hrdina <phrdina@redhat.com>
Tue, 3 Feb 2015 13:20:25 +0000 (14:20 +0100)
committerPavel Hrdina <phrdina@redhat.com>
Tue, 3 Feb 2015 15:37:01 +0000 (16:37 +0100)
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@redhat.com>
src/util/virutil.c

index c9052093cdd425f44ddfcf990e9b82a5032d44c4..4a95292f5e18f64354217ac456e54e0ebac33b79 100644 (file)
@@ -2578,10 +2578,18 @@ virGetListenFDs(void)
 
 #endif /* WIN32 */
 
+#ifndef WIN32
 long virGetSystemPageSize(void)
 {
     return sysconf(_SC_PAGESIZE);
 }
+#else /* WIN32 */
+long virGetSystemPageSize(void)
+{
+    errno = ENOSYS;
+    return -1;
+}
+#endif /* WIN32 */
 
 long virGetSystemPageSizeKB(void)
 {