From 0e8c631f5e58473d7f802ccaaf3fe61cf4dc403e Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 3 Oct 2023 12:59:38 +0200 Subject: [PATCH] tests: old g++ needs explicit cast --- test/lib/brick-shelltest.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/lib/brick-shelltest.h b/test/lib/brick-shelltest.h index a5a81e688..0f7e6b227 100644 --- a/test/lib/brick-shelltest.h +++ b/test/lib/brick-shelltest.h @@ -103,8 +103,8 @@ class Timespec { struct timespec ts; static const long _NSEC_PER_SEC = 1000000000; public: - Timespec( time_t _sec = 0, long _nsec = 0 ) { ts = { _sec, _nsec }; } - Timespec( const struct timeval &tv ) { ts = { tv.tv_sec, tv.tv_usec * 1000 }; } + Timespec( time_t _sec = 0, long _nsec = 0 ) { ts = (struct timespec) { _sec, _nsec }; } + Timespec( const struct timeval &tv ) { ts = (struct timespec) { tv.tv_sec, tv.tv_usec * 1000 }; } long sec() const { return (long)ts.tv_sec; } long nsec() const { return (long)ts.tv_nsec; } void gettime() { @@ -941,7 +941,7 @@ struct TestCase { return false; } - struct timeval wait = { 0, 500000 /* timeout 0.5s */ }; + struct timeval wait = (struct timeval) { 0, 500000 /* timeout 0.5s */ }; fd_set set; FD_ZERO( &set ); -- 2.43.5