From patchwork Fri Mar 31 21:35:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Seiderer X-Patchwork-Id: 669327 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C192C76196 for ; Fri, 31 Mar 2023 21:35:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232932AbjCaVfH (ORCPT ); Fri, 31 Mar 2023 17:35:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229998AbjCaVfG (ORCPT ); Fri, 31 Mar 2023 17:35:06 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AC3B1EFE8 for ; Fri, 31 Mar 2023 14:35:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1680298504; i=ps.report@gmx.net; bh=nYQwD9PTnIV16rk+6rCYGfdwng+QWXHUl9sOdkX4DZw=; h=X-UI-Sender-Class:From:To:Subject:Date; b=tnufBGG22rR1LoM8PQLsaWyowt1I3ZdMzPc+gAE6XsnH6o9kzsKd2CXD0myn58Vhg 2Q5IXsDJ6HfsBcyY7ujCuSh8PTVG9EZIubRMVL0wpKmeZ+ZeZe6ee68MLaBBy4KgtM Tr1brm21wz4y9hx8VCsahhyKo9vENwN6zKt6lZcrVJUf5PMZQF3uboFbyzyONYWRcA CWFlt8P/7NyEgQmmJ1GtQqJ6JoVevMjsDPcnD9HF5QG+hQwri+0HSQUkRtMpJCQQGl WOrZaUgo5GfFfl2PjJCe9LHufkMLMqB6ht+RVN9zyZpXDRpC/CSl+jqNmWicZPFQms nCEtDzTd0PVVA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from localhost.fritz.box ([62.216.208.135]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N9MpS-1qTkSx3Hz2-015JtD for ; Fri, 31 Mar 2023 23:35:03 +0200 From: Peter Seiderer To: linux-media@vger.kernel.org Subject: [PATCH v4l-utils v1 1/2] v4l2-tracer: wrap open64/mmap64 functions only if linux && __GLIBC__ Date: Fri, 31 Mar 2023 23:35:02 +0200 Message-Id: <20230331213503.24082-1-ps.report@gmx.net> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:K81SeGxUXxoWqJxeWBsr8LidD3xlAkKtWymuZMWgJIK9v42j7Eg LNplLmQb4cZ942/eH7tUPNZYo8DD+lSQzuZFlvFr/I69YCs7NqsFdMPm/d0wwLpEgOvr/QV pfCidFGBFgrXvLtelt68YRwKOeZec15sshWr0+rfAKWrZae9bSqT957TZOEFN+MsWZobYUR SdS1Q66sV8s0RwrPi/1jg== UI-OutboundReport: notjunk:1;M01:P0:8iTC5RhBV40=;IXTzJlq+rDoWG30UgARvv4BK56+ odzmHrbzV9wQi1zUyZVZzuVC/GhAxvR2zsUHOBz5PlEmuYOi4fj7l7sk4mOHz6arBeGXNEJ4Q cGTCxXVA3OLQTYudqdjo50nBb5klaQPUCUxewMGWVom/WB2kA2XjnGzTbscjIaiKrhm2wRwHH ZDf1RW/jhvL9moz0yzkbbzavz4UB/ez+yx3WQi4HPR1aGabws+8bqW2+e6D5rt0dmFGoTFrOC tV0FvmNquk8nGjuvt/3L3DJWGEmkK8wza1/ICXPUb7q0lJOF2i9GcR+FaXQovRYYos9lqUdXH 44Vt/ToKrWpIuE6R26BMZ9tEDyBMLBnDqSrBGrJdjQF+v3Z9uBpZTX1gGzWjNrJT9bNqvQUTL 8T38IwXNudUrZhxto6UYySY+TusXVOR+VO/f0b/7+Xs5ubE3Uv03tkTrWFWCfeLpNBOsO0aHf Tp1qV6KpdS6w8LB7gY4BBrowUWA/z3j7IoTL3ORyTmk+zY1TZwpbvGgPoQzfrOqV5gmGce8qR H73kmXIzSMhKIDpLFrfg1BI3AVvEUXI1vPtgij07PxJU9OHpUl6DLGmdRVzHtbkJOFbEkTVbq KGZ5zHjrnuwoeqJNeFX4AtiYdxmOxdFPGPYEmRN0Op79YPE31U6w2m3hFyRJoGjsf64FlQRbg OLPHid73xnv1HySjDldp1E78vTJfRBjv9YMp6PwxM/fs1uwGXYHVVJqa8Xpi6odWxZkl0lNlQ ts5kl0pm+Et1UBPbE0TPma0/GhXmFbfNTrV8NZge1HHNva6841KJubtSzHdkdz/zS5VT3UB+D MgYKkhRv7Ulr3sKEfpErxsrJpv9XQ0ciffSqA591CugWx9oQfMzBPwSmBBUuGAA4bAGax8R0A fvmgAhKDnmuGrFBlPgUkH4X4/JC530KjThdd4N4EN5IxBsQDZb2bYf4ApkYW7RKWTO59jh6OT 4I4DNVAk7E0l6Z12vz00Qy9udF4= Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Wrap open64/mmap64 functions only if linux && __GLIBC__, as done in lib/libv4l1/v4l1comapt.c and lib/libv4l2/v4l2convert.c since commit 'libv4l: Wrap LFS64 functions only if linux && __GLIBC__' (403a4e2697a1ff96fe2fa16589039595f21cadf0), should fix musl libc compile. Signed-off-by: Peter Seiderer --- utils/v4l2-tracer/libv4l2tracer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/v4l2-tracer/libv4l2tracer.cpp b/utils/v4l2-tracer/libv4l2tracer.cpp index a9f039c7..68f6304a 100644 --- a/utils/v4l2-tracer/libv4l2tracer.cpp +++ b/utils/v4l2-tracer/libv4l2tracer.cpp @@ -89,6 +89,7 @@ int open(const char *path, int oflag, ...) return fd; } +#if defined(linux) && defined(__GLIBC__) int open64(const char *path, int oflag, ...) { errno = 0; @@ -124,6 +125,7 @@ int open64(const char *path, int oflag, ...) return fd; } +#endif int close(int fd) { @@ -177,6 +179,7 @@ void *mmap(void *addr, size_t len, int prot, int flags, int fildes, off_t off) return buf_address_pointer; } +#if defined(linux) && defined(__GLIBC__) void *mmap64(void *addr, size_t len, int prot, int flags, int fildes, off_t off) { errno = 0; @@ -191,6 +194,7 @@ void *mmap64(void *addr, size_t len, int prot, int flags, int fildes, off_t off) return buf_address_pointer; } +#endif int munmap(void *start, size_t length) {