From 48957b97c2bc4f0c2ade61d58d474f5108fe3a44 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Thu, 16 Apr 2020 13:22:57 +0100 Subject: [PATCH] os/time: Fix warnings on C++ --- src/xrt/auxiliary/os/os_time.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/xrt/auxiliary/os/os_time.h b/src/xrt/auxiliary/os/os_time.h index 2fc745df5..bbb1eb3b0 100644 --- a/src/xrt/auxiliary/os/os_time.h +++ b/src/xrt/auxiliary/os/os_time.h @@ -63,11 +63,9 @@ static inline void os_nanosleep(long nsec) { #ifdef XRT_OS_LINUX - struct timespec spec = { - .tv_sec = 0, - .tv_nsec = nsec, - }; - nanosleep(&spec, NULL); + struct timespec spec; + spec.tv_sec = 0; + spec.tv_nsec = nsec, nanosleep(&spec, NULL); #endif }