From patchwork Sun Apr 11 17:52:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 26865 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id C9F534498A1 for ; Sun, 11 Apr 2021 20:53:08 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 99AF8687FE0; Sun, 11 Apr 2021 20:53:08 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mailout07.t-online.de (mailout07.t-online.de [194.25.134.83]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5EC5F687F54 for ; Sun, 11 Apr 2021 20:53:02 +0300 (EEST) Received: from fwd08.aul.t-online.de (fwd08.aul.t-online.de [172.20.26.151]) by mailout07.t-online.de (Postfix) with SMTP id 23EDA303CB for ; Sun, 11 Apr 2021 19:52:11 +0200 (CEST) Received: from fli4l.lan.fli4l (TWKhgZZQQhHmf06DpouBui127AdijkqgXPzgPvjPHsCURX8NCCZUt+R0U2Ff6x1w0Q@[91.58.11.208]) by fwd08.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1lVeFl-4BliVM0; Sun, 11 Apr 2021 19:52:09 +0200 Received: from mahler.lan.fli4l ([192.168.1.1]:38198) by fli4l.lan.fli4l with esmtp (Exim 4.94) (envelope-from ) id 1lVeFk-0002tW-45 for ffmpeg-devel@ffmpeg.org; Sun, 11 Apr 2021 19:52:08 +0200 From: Bernd Kuhls To: ffmpeg-devel@ffmpeg.org Date: Sun, 11 Apr 2021 19:52:08 +0200 Message-Id: <20210411175208.1458204-1-bernd.kuhls@t-online.de> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-Spam-Score: -2.5 (--) X-ID: TWKhgZZQQhHmf06DpouBui127AdijkqgXPzgPvjPHsCURX8NCCZUt+R0U2Ff6x1w0Q X-TOI-EXPURGATEID: 150726::1618163529-000072E4-B58B1114/0/0 CLEAN NORMAL X-TOI-MSGID: 20ec497a-25cb-4b20-98ce-a1c4f4adbba2 Subject: [FFmpeg-devel] [PATCH 1/1] libavutil: Fix uClibc build for mips X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" uClibc does not provide sys/auxv.h: libavutil/mips/cpu.c:26:10: fatal error: sys/auxv.h: No such file or directory and not getauxval: libavutil/mips/cpu.c: In function ‘cpucfg_available’: libavutil/mips/cpu.c:37:12: error: implicit declaration of function ‘getauxval’ [-Werror=implicit-function-declaration] return getauxval(AT_HWCAP) & HWCAP_LOONGSON_CPUCFG; ^~~~~~~~~ libavutil/mips/cpu.c:37:22: error: ‘AT_HWCAP’ undeclared (first use in this function) return getauxval(AT_HWCAP) & HWCAP_LOONGSON_CPUCFG; Signed-off-by: Bernd Kuhls --- libavutil/mips/cpu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavutil/mips/cpu.c b/libavutil/mips/cpu.c index 59619d54de..c5da77b22b 100644 --- a/libavutil/mips/cpu.c +++ b/libavutil/mips/cpu.c @@ -19,7 +19,8 @@ #include "libavutil/cpu.h" #include "libavutil/cpu_internal.h" #include "config.h" -#if defined __linux__ || defined __ANDROID__ +#include +#if (defined __linux__ || defined __ANDROID__) && !defined(__UCLIBC__) #include #include #include @@ -28,7 +29,7 @@ #include "libavutil/avstring.h" #endif -#if defined __linux__ || defined __ANDROID__ +#if (defined __linux__ || defined __ANDROID__) && !defined(__UCLIBC__) #define HWCAP_LOONGSON_CPUCFG (1 << 14) @@ -105,7 +106,7 @@ static int cpu_flags_cpuinfo(void) int ff_get_cpu_flags_mips(void) { -#if defined __linux__ || defined __ANDROID__ +#if (defined __linux__ || defined __ANDROID__) && !defined(__UCLIBC__) if (cpucfg_available()) return cpu_flags_cpucfg(); else