From patchwork Wed Mar 20 16:58:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Dylan_A=C3=AFssi?= X-Patchwork-Id: 19785 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id CEC50C3272 for ; Wed, 20 Mar 2024 20:50:25 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BAE9F63075; Wed, 20 Mar 2024 21:50:24 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="xblgoOiu"; dkim-atps=neutral Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [IPv6:2a00:1098:ed:100::25]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4F731603AC for ; Wed, 20 Mar 2024 17:59:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1710953961; bh=aovGW4ZJNHjLg2gUMafJRQzjeJfweQw84XhAAntIyNo=; h=From:To:Cc:Subject:Date:From; b=xblgoOiuwClRh9i27x/IzIZMbuC3cKEYxv6iJB4tWBSbw+pKC5J5EayZAwsNXAdpe h2lv8u7heqxKDJWiBxphjJc8VJhUdrbyptkPxbw8htBNWBi5dx76hFvEKojz61tWPa IiyfiimkaptGLc0Pw6j3bAv4IXVkUXh/li75vD6+zv1KUOTtmCLWCFmxvAItKUzQWo lkv9WfXoG/QcARe3H1V8RUvCCHX9sA5Tj+nUoG0AfbVT2YqGVFlNk5VB0kdr4zriXm P/KPuV+GVH/64iQF7rD9jpCIF6sXsdmsUsn1oIb/YeZziJAh5L7fVizSBr3DIoq7EA p9ZJgWqbNP+0A== Received: from XPS13-9310.home (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: daissi) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 9CE2337804B2; Wed, 20 Mar 2024 16:59:21 +0000 (UTC) From: =?utf-8?q?Dylan_A=C3=AFssi?= To: libcamera-devel@lists.libcamera.org Cc: Steve Langasek , =?utf-8?b?RHlsYW4gQcOv?= =?utf-8?q?ssi?= Subject: [PATCH] v4l2: unset _TIME_BITS in addition to _FILE_OFFSET_BITS Date: Wed, 20 Mar 2024 17:58:40 +0100 Message-Id: <20240320165840.35902-1-dylan.aissi@collabora.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 20 Mar 2024 21:50:23 +0100 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Steve Langasek libcamera fails to build from source in Debian/Ubuntu on 32-bit architectures under 64-bit time_t (to avoid the 'year 2038 problem'), because its v4l2 module legitimately un-sets _FILE_OFFSET_BITS for building but this is not allowed without also unsetting _TIME_BITS. Having verified that nothing in this module is sensitive to 64-bit time_t (none of the functions it intercepts handle time), we also unset _TIME_BITS to allow this to build as before. Signed-off-by: Steve Langasek Reviewed-by: Dylan Aïssi Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/v4l2/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/src/v4l2/meson.build b/src/v4l2/meson.build index e88e0b33..12d1e2a4 100644 --- a/src/v4l2/meson.build +++ b/src/v4l2/meson.build @@ -23,6 +23,7 @@ v4l2_compat_cpp_args = [ # file operations, disable transparent large file support. '-U_FILE_OFFSET_BITS', '-D_FILE_OFFSET_BITS=32', + '-U_TIME_BITS', '-D_LARGEFILE64_SOURCE', '-fvisibility=hidden', ]