From fcac0cf7e9be1260fcd32dabaf9a81c039a33d21 Mon Sep 17 00:00:00 2001 From: Roman Bogorodskiy Date: Sat, 23 May 2015 19:56:43 +0300 Subject: [PATCH] bhyve: fix build with gcc48 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bhyve/bhyve_monitor.c b/src/bhyve/bhyve_monitor.c index 7f19c6ebfc..131672014a 100644 --- a/src/bhyve/bhyve_monitor.c +++ b/src/bhyve/bhyve_monitor.c @@ -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; -- GitLab