From patchwork Wed Jun 9 18:58:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 28189 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a5e:c91a:0:0:0:0:0 with SMTP id z26csp1095627iol; Wed, 9 Jun 2021 11:59:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8Pf2JJ3surhSepUhuSVNX85bCfUdlrJ63hjREq/TY5s7OI1bO2reF6GyyEo8nipQAQviW X-Received: by 2002:a05:6402:2317:: with SMTP id l23mr834402eda.265.1623265156500; Wed, 09 Jun 2021 11:59:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623265156; cv=none; d=google.com; s=arc-20160816; b=oZnvsUs1++pRxeQ/h7On+vqbHmaAJQYIOnf3JknTHYNZwGp8NLzVvRKDzPr7SBOPF/ B/g7/uPFQ2n1bwyIolpV0R7fBiiZM6ChtuWe6FtHlpLM3KG+wDwaIjk1Njw4RArgf9Z0 L6ebhItLSGZobrvhgOtmapJwtHKpY8iPqDP5/RME/N1Qi+MeZbpZ8/fEWvuE4p1jFmiZ XSaD6BZgps7qUq2rGT0W6zyyTU54pbMRDpks3M7IV/SVsewdrWrYLTqZSPmFioG/yGUi /FpAlQRvRHyCUElmRtJe6DlJUgeO79huFrcVtzstKVs1G/5hyOQYrjBCkyQI8melBbvT K6Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=M3MDkwQMnP4J3BASwCAG2x1Vefurkp0SuUxFC0Lxe9s=; b=vMcmImDeeRaMwoqao7F+wxw3SdjrmP9oqeAXIGL5E+vfHMGJyFu+3jGUPvAxqQMS7g zeJz6D+VcoauD7EP2DUCIKBOCEeL6hfe2xCjAWjBpfwt1hSPHihW9dmuSYCS83CNe1LH 66sN/d0/psshhWSvPXb6qz7h0rEIBpNVbNIdx5FkiXQ1xQVDWivZXclUzsV9JaZlcT1T lZPxr/XqASmVeDEGOIZk879FMPrerLcmhGZA7wSFIJA9ixdVFlJX0dWvtpq1cANbIZcw a/n5bVHeA1aCDM8ExHKAeJTW9NsF7+MuZGXHZKODSUOJtUGd7xwch3cPigphFM9poJOH SKPg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id yc21si419411ejb.411.2021.06.09.11.58.57; Wed, 09 Jun 2021 11:59:16 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EE8EE6806F7; Wed, 9 Jun 2021 21:58:53 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mailout03.t-online.de (mailout03.t-online.de [194.25.134.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E3E5D6806F7 for ; Wed, 9 Jun 2021 21:58:47 +0300 (EEST) Received: from fwd35.aul.t-online.de (fwd35.aul.t-online.de [172.20.27.145]) by mailout03.t-online.de (Postfix) with SMTP id 3DBAB1BA7C for ; Wed, 9 Jun 2021 20:58:47 +0200 (CEST) Received: from fli4l.lan.fli4l (r3lKv8ZHYhTxJQANZevurpnvm2RDrd20Y5GFBA92PJEr2LQF8NVeFNucge2bj5dQV1@[91.58.8.174]) by fwd35.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1lr3Pa-3zVfKC0; Wed, 9 Jun 2021 20:58:46 +0200 Received: from mahler.lan.fli4l ([192.168.1.1]:41634) by fli4l.lan.fli4l with esmtp (Exim 4.94.2) (envelope-from ) id 1lr3PZ-0006Xr-MJ for ffmpeg-devel@ffmpeg.org; Wed, 09 Jun 2021 20:58:46 +0200 From: Bernd Kuhls To: ffmpeg-devel@ffmpeg.org Date: Wed, 9 Jun 2021 20:58:45 +0200 Message-Id: <20210609185845.996364-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: r3lKv8ZHYhTxJQANZevurpnvm2RDrd20Y5GFBA92PJEr2LQF8NVeFNucge2bj5dQV1 X-TOI-EXPURGATEID: 150726::1623265126-0000C8B5-599428A3/0/0 CLEAN NORMAL X-TOI-MSGID: 18b4883e-3d71-4efc-ae0c-dc2c6347ff4d Subject: [FFmpeg-devel] [PATCH v2 1/1] libavutil: Fix mips build X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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" X-TUID: H9qwkQOfhgvr Check for sys/auxv.h because not all toolchains contain this header. Fixes https://trac.ffmpeg.org/ticket/9138 Signed-off-by: Bernd Kuhls --- v2: defined(HAVE_SYS_AUXV_H) -> HAVE_SYS_AUXV_H configure | 2 ++ libavutil/mips/cpu.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 6bfd98b384..773a7d516c 100755 --- a/configure +++ b/configure @@ -2161,6 +2161,7 @@ HEADERS_LIST=" opencv2_core_core_c_h OpenGL_gl3_h poll_h + sys_auxv_h sys_param_h sys_resource_h sys_select_h @@ -6218,6 +6219,7 @@ check_func_headers VideoToolbox/VTCompressionSession.h VTCompressionSessionPrepa check_headers windows.h check_headers X11/extensions/XvMClib.h check_headers asm/types.h +check_headers sys/auxv.h # it seems there are versions of clang in some distros that try to use the # gcc headers, which explodes for stdatomic diff --git a/libavutil/mips/cpu.c b/libavutil/mips/cpu.c index 59619d54de..19196de50b 100644 --- a/libavutil/mips/cpu.c +++ b/libavutil/mips/cpu.c @@ -19,7 +19,7 @@ #include "libavutil/cpu.h" #include "libavutil/cpu_internal.h" #include "config.h" -#if defined __linux__ || defined __ANDROID__ +#if (defined __linux__ || defined __ANDROID__) && HAVE_SYS_AUXV_H #include #include #include @@ -28,7 +28,7 @@ #include "libavutil/avstring.h" #endif -#if defined __linux__ || defined __ANDROID__ +#if (defined __linux__ || defined __ANDROID__) && HAVE_SYS_AUXV_H #define HWCAP_LOONGSON_CPUCFG (1 << 14) @@ -105,7 +105,7 @@ static int cpu_flags_cpuinfo(void) int ff_get_cpu_flags_mips(void) { -#if defined __linux__ || defined __ANDROID__ +#if (defined __linux__ || defined __ANDROID__) && HAVE_SYS_AUXV_H if (cpucfg_available()) return cpu_flags_cpucfg(); else