From patchwork Wed Jul 11 13:22:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 10519749 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B46A4600CA for ; Wed, 11 Jul 2018 13:23:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A9B1E25EF7 for ; Wed, 11 Jul 2018 13:23:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E11828F2B; Wed, 11 Jul 2018 13:23:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1939928B93 for ; Wed, 11 Jul 2018 13:23:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387714AbeGKN1W (ORCPT ); Wed, 11 Jul 2018 09:27:22 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:50684 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732530AbeGKN1W (ORCPT ); Wed, 11 Jul 2018 09:27:22 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 455D4260C4A From: Ezequiel Garcia To: linux-media@vger.kernel.org Cc: Hans Verkuil , Peter Korsgaard , Ezequiel Garcia Subject: [PATCH] libv4l: fixup lfs mismatch in preload libraries Date: Wed, 11 Jul 2018 10:22:51 -0300 Message-Id: <20180711132251.13172-1-ezequiel@collabora.com> X-Mailer: git-send-email 2.18.0.rc2 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Peter Korsgaard Ensure that the lfs variants are not transparently used instead of the !lfs ones so both can be wrapped, independently of any custom CFLAGS/CPPFLAGS. Without this patch, the following assembler errors appear during cross-compiling with Buildroot: /tmp/ccc3gdJg.s: Assembler messages: /tmp/ccc3gdJg.s:67: Error: symbol `open64' is already defined /tmp/ccc3gdJg.s:130: Error: symbol `mmap64' is already defined Signed-off-by: Peter Korsgaard Signed-off-by: Ezequiel Garcia --- lib/libv4l1/v4l1compat.c | 3 +++ lib/libv4l2/v4l2convert.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lib/libv4l1/v4l1compat.c b/lib/libv4l1/v4l1compat.c index cb79629ff88f..e5c9e56261e2 100644 --- a/lib/libv4l1/v4l1compat.c +++ b/lib/libv4l1/v4l1compat.c @@ -19,6 +19,9 @@ # Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ +/* ensure we see *64 variants and they aren't transparently used */ +#undef _LARGEFILE_SOURCE +#undef _FILE_OFFSET_BITS #define _LARGEFILE64_SOURCE 1 #include diff --git a/lib/libv4l2/v4l2convert.c b/lib/libv4l2/v4l2convert.c index 7c9a04c086ed..13ca4cfb1b08 100644 --- a/lib/libv4l2/v4l2convert.c +++ b/lib/libv4l2/v4l2convert.c @@ -23,6 +23,9 @@ /* prevent GCC 4.7 inlining error */ #undef _FORTIFY_SOURCE +/* ensure we see *64 variants and they aren't transparently used */ +#undef _LARGEFILE_SOURCE +#undef _FILE_OFFSET_BITS #define _LARGEFILE64_SOURCE 1 #ifdef ANDROID