Package: chromium / 138.0.7204.157-1

fixes/armhf-timespec.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
author: Andres Salomon <dilinger@debian.org>

fix armhf build failure:

../../media/gpu/v4l2/legacy/v4l2_video_decoder_backend_stateful.cc:446:20: error: non-constant-expression cannot be narrowed from type '__suseconds64_t' (aka 'long long') to 'long' in initializer list [-Wc++11-narrowing]
  446 |         .tv_nsec = timeval.tv_usec * 1000,
      |                    ^~~~~~~~~~~~~~~~~~~~~~
../../media/gpu/v4l2/legacy/v4l2_video_decoder_backend_stateful.cc:446:20: note: insert an explicit cast to silence this issue
  446 |         .tv_nsec = timeval.tv_usec * 1000,
      |                    ^~~~~~~~~~~~~~~~~~~~~~
      |                    static_cast<long>(    )
1 error generated.


--- a/media/gpu/v4l2/legacy/v4l2_video_decoder_backend_stateful.cc
+++ b/media/gpu/v4l2/legacy/v4l2_video_decoder_backend_stateful.cc
@@ -28,6 +28,8 @@
 #include "media/gpu/v4l2/v4l2_video_decoder_backend.h"
 #include "media/gpu/v4l2/v4l2_vp9_helpers.h"
 
+#include "build/build_config.h"
+
 namespace media {
 
 namespace {
@@ -443,7 +445,11 @@ void V4L2StatefulVideoDecoderBackend::On
     const struct timeval timeval = buffer->GetTimeStamp();
     const struct timespec timespec = {
         .tv_sec = timeval.tv_sec,
+#if defined(ARCH_CPU_ARM_FAMILY) && defined(ARCH_CPU_32_BITS)
+        .tv_nsec = static_cast<long>(timeval.tv_usec) * 1000,
+#else
         .tv_nsec = timeval.tv_usec * 1000,
+#endif
     };
 
     const int64_t flat_timespec =