]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
bhyve: fix build with gcc48
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Sat, 23 May 2015 16:56:43 +0000 (19:56 +0300)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Sun, 24 May 2015 07:12:35 +0000 (10:12 +0300)
Build with gcc 4.8 fails with:

bhyve/bhyve_monitor.c: In function 'bhyveMonitorIO':
bhyve/bhyve_monitor.c:51:18: error: missing initializer for field 'tv_sec' of 'const struct timespec' [-Werror=missing-field-initializers]
     const struct timespec zerowait = {};

Explicitly initialize zerowait to fix the build.

src/bhyve/bhyve_monitor.c

index 7f19c6ebfc1f8b6c5e4e6947cadc4f127eead4ed..131672014a1e715d64bdc4912c44b2d12486b2dc 100644 (file)
@@ -48,7 +48,7 @@ struct _bhyveMonitor {
 static void
 bhyveMonitorIO(int watch, int kq, int events ATTRIBUTE_UNUSED, void *opaque)
 {
-    const struct timespec zerowait = {};
+    const struct timespec zerowait = { 0, 0 };
     bhyveMonitorPtr mon = opaque;
     struct kevent kev;
     int rc, status;