0001-meson.build-fix-arm-_TIME_BITS-64-error.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 6faf5e963eadeab8b7d47d5b3c14f06e0ae1da01 Mon Sep 17 00:00:00 2001
  2. From: Hans Verkuil <hverkuil@xs4all.nl>
  3. Date: Sat, 12 Apr 2025 12:30:13 +0200
  4. Subject: [PATCH] meson.build: fix arm _TIME_BITS=64 error
  5. Undefine _TIME_BITS to avoid this error on 32-bit arm:
  6. /usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
  7. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
  8. Upstream: https://git.linuxtv.org/v4l-utils.git/commit/?id=d517cfdcdc16533ab7e06e97c07ca089cf261aef
  9. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  10. ---
  11. meson.build | 6 +++++-
  12. 1 file changed, 5 insertions(+), 1 deletion(-)
  13. diff --git a/meson.build b/meson.build
  14. index 269a9da7..31927cda 100644
  15. --- a/meson.build
  16. +++ b/meson.build
  17. @@ -53,8 +53,12 @@ v4l2_wrapper_args = [
  18. # As the library needs to provide both 32-bit and 64-bit versions
  19. # of file operations, disable transparent large file support (fixes
  20. # 'Error: symbol `open64/mmap64' is already defined' compile failure
  21. - # otherwise)
  22. + # otherwise).
  23. + #
  24. + # Also disable _TIME_BITS=64 since this is allowed only with
  25. + # _FILE_OFFSET_BITS=64, which is now 32.
  26. '-U_FILE_OFFSET_BITS',
  27. + '-U_TIME_BITS',
  28. '-D_FILE_OFFSET_BITS=32',
  29. '-D_LARGEFILE64_SOURCE',
  30. ]
  31. --
  32. 2.49.0