From patchwork Sun Jun 6 07:26:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 28110 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp2517285iof; Sun, 6 Jun 2021 00:26:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/28zea/RBzvRZ7qgBN7hx6qLRgto32A3hzt9PmGODGl8dJE0GbgDkQPGqkqw3crqbJzDV X-Received: by 2002:a17:906:ca54:: with SMTP id jx20mr12202496ejb.380.1622964411493; Sun, 06 Jun 2021 00:26:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622964411; cv=none; d=google.com; s=arc-20160816; b=R3TuQFAwJH2XWBUXZVnJuo6fk0N2gUIJMnVL284eBTuDB0px2sdN9p89ZVZ3cQ6YBq KRwnutKuNJQZgHINymVBoyiFTgTmiGQm7vZebGB+8/rgQmHH2ykg4VApro8IBhbiuZ4d sLURGxs5JNeb3rrHB3qVSLNOpBhefB30zrn95Iw04WifcXM3KDfmoMZPPeKFq3sdp/wY r8LmBLBbmhwsVqzWOteF9kOj/XWzNPggHm/faNeBV1UvgpjyxvsZKpTSf+k6Mfgfv3m7 tcXP7GXdG5zs3j7Ubu2wRuaPsT7SuJiSHxMp7gUwYO8ndUGczRYQZnGjmIHD1BeU9wVI 0tVg== 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=oLSgB7JgsKTWNFqrdq/wskPVsVMZpnEDSv9duDW7nBo=; b=M6CL0R3qNgRQ4aIS/qW06tBlNuiEpDix1OHL/dVO8hcp/nwlwcXRgddFOnDrvSvKdD RT+aPrDiFZadafQ6iUOy7wNlyTB1wgcjgGy3dNklacD+Sp1kUmPOseNLIh7cJnmiyWDE lXJ5Ytwo1i0Q/v8Mwg2KYIUw6vnu0BFy1c41fcKswEiSs7iIDHXC8sZi5y/o7t/0KSpg yIrNLCalNJCjyUjHF05KPyWgAKUHqK1atZ/1xqBAMYySPRmLMXBUIujyy7JVDeDS4+H9 cwXlDZtmoZvPVZXwFGwkaDkdzCn2xtZvD5w8H7/UHCCbETjVAlxMXN6SNHe1NQ5AXUx1 lulQ== 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 s18si10913530eji.591.2021.06.06.00.26.50; Sun, 06 Jun 2021 00:26:51 -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 B12C868A6EA; Sun, 6 Jun 2021 10:26:47 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mailout04.t-online.de (mailout04.t-online.de [194.25.134.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3B42368A323 for ; Sun, 6 Jun 2021 10:26:41 +0300 (EEST) Received: from fwd35.aul.t-online.de (fwd35.aul.t-online.de [172.20.27.145]) by mailout04.t-online.de (Postfix) with SMTP id 072EB37EDB for ; Sun, 6 Jun 2021 09:26:40 +0200 (CEST) Received: from fli4l.lan.fli4l (VOxpfOZeQhjBRfQ5XnIfOcaPQD57nCzYHHwQ-MK5qu01Uhau2ctVqEJCbIjjtNQQgB@[91.58.1.220]) by fwd35.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1lpnAw-1NGXFA0; Sun, 6 Jun 2021 09:26:26 +0200 Received: from mahler.lan.fli4l ([192.168.1.1]:60360) by fli4l.lan.fli4l with esmtp (Exim 4.94.2) (envelope-from ) id 1lpnAv-0007TH-Bv for ffmpeg-devel@ffmpeg.org; Sun, 06 Jun 2021 09:26:25 +0200 From: Bernd Kuhls To: ffmpeg-devel@ffmpeg.org Date: Sun, 6 Jun 2021 09:26:25 +0200 Message-Id: <20210606072625.670829-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: VOxpfOZeQhjBRfQ5XnIfOcaPQD57nCzYHHwQ-MK5qu01Uhau2ctVqEJCbIjjtNQQgB X-TOI-EXPURGATEID: 150726::1622964386-0000C8B5-BF58D293/0/0 CLEAN NORMAL X-TOI-MSGID: e3485469-7045-40e1-8a98-19ddce99f1be Subject: [FFmpeg-devel] [PATCH 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: LXko+w4It8Oo Check for sys/auxv.h because not all toolchains contain this header. Fixes https://trac.ffmpeg.org/ticket/9138 Signed-off-by: Bernd Kuhls --- configure | 2 ++ libavutil/mips/cpu.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 82367fd30d..b0154cb8b2 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 @@ -6210,6 +6211,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..4738104cdd 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__) && defined(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__) && defined(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__) && defined(HAVE_SYS_AUXV_H) if (cpucfg_available()) return cpu_flags_cpucfg(); else