Skip to contentSkip to conversation

libcamera: Diable 64bit time_t on glibc targets

PATCH New Khem Raj 1 participant 2 messages Jan 2, 2023

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 libcamera: Diable 64bit time_t on glibc targets

it overrides some of LFS64 functions in peculiar ways that it has to undefine _FILE_OFFSET_BITS to silence the funtion definitions from glibc

---
 .../recipes-multimedia/libcamera/libcamera_0.0.1.bb          | 5 +++++
 1 file changed, 5 insertions(+)
meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.1.bb +5 -0
index 2b77d99371..483fe1507e 100644
@@ -64,3 +64,8 @@ do_recalculate_ipa_signatures_package() {
 
 FILES:${PN} += " ${libdir}/v4l2-compat.so"
 FILES:${PN}-gst = "${libdir}/gstreamer-1.0"
+
+# libcamera-v4l2 explicitly sets _FILE_OFFSET_BITS=32 to get access to
+# both 32 and 64 bit file APIs.
+GLIBC_64BIT_TIME_FLAGS = ""
+
Signature · 1 line
2.39.0
author
#1 lore raw

PATCH 2/2 v4l-utils: Diable 64bit time_t on glibc targets

it overrides some of LFS64 functions in peculiar ways that it has to undefine _FILE_OFFSET_BITS to silence the funtion definitions from glibc

---
 meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.23.0.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.23.0.bb +4 -0
index 5bc63058f6..383be4a543 100644
@@ -13,6 +13,10 @@ DEPENDS = "jpeg \
 DEPENDS:append:libc-musl = " argp-standalone"
 DEPENDS:append:class-target = " udev"
 LDFLAGS:append = " -pthread"
+# v4l2 explicitly sets _FILE_OFFSET_BITS=32 to get access to
+# both 32 and 64 bit file APIs.  But it does not handle the time side?
+# Needs further investigation
+GLIBC_64BIT_TIME_FLAGS = ""
 
 inherit autotools gettext pkgconfig
 
Signature · 1 line
2.39.0