From 859a5bfa0efaee2c793f36c6c1fe6324d42a97b2 Mon Sep 17 00:00:00 2001 From: David Hampton Date: Mon, 22 Jan 2024 17:32:51 -0500 Subject: [PATCH] Cast 64->32 bit narrowing when building for 32bit system. Some compilers just print a warning for this, while others throw an error and fail the compilation. --- mythtv/libs/libmythtv/recorders/dvbchannel.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mythtv/libs/libmythtv/recorders/dvbchannel.cpp b/mythtv/libs/libmythtv/recorders/dvbchannel.cpp index cbbb1fd8d76..ccad0124c9f 100644 --- a/mythtv/libs/libmythtv/recorders/dvbchannel.cpp +++ b/mythtv/libs/libmythtv/recorders/dvbchannel.cpp @@ -1589,7 +1589,12 @@ bool DVBChannel::WaitForBackend(std::chrono::milliseconds timeout_ms) const int fd = m_fdFrontend; auto seconds = duration_cast(timeout_ms); auto usecs = duration_cast(timeout_ms) - seconds; +#if defined(__x86_64__) struct timeval select_timeout = { seconds.count(), usecs.count()}; +#else + struct timeval select_timeout = { static_cast(seconds.count()), + static_cast(usecs.count()) }; +#endif fd_set fd_select_set; FD_ZERO( &fd_select_set); // NOLINT(readability-isolate-declaration) FD_SET (fd, &fd_select_set);