From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id DECA242417 for ; Wed, 20 Apr 2022 18:00:58 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C57E668B444; Wed, 20 Apr 2022 21:00:57 +0300 (EEST) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4887C68B3FA for ; Wed, 20 Apr 2022 21:00:51 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 44997E6E37 for ; Wed, 20 Apr 2022 20:00:52 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pyQFcTDEKohC for ; Wed, 20 Apr 2022 20:00:50 +0200 (CEST) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id 0205DE6E26 for ; Wed, 20 Apr 2022 20:00:50 +0200 (CEST) Date: Wed, 20 Apr 2022 20:00:49 +0200 (CEST) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: <20220414212043.25953-1-cus@passwd.hu> Message-ID: References: <20220414212043.25953-1-cus@passwd.hu> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] avutil/cpu: #define _GNU_SOURCE before including any standard headers 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Thu, 14 Apr 2022, Marton Balint wrote: > Otherwise its effect might not work causing CPU_COUNT to not get defined. > > Fixes cpu count detection to actually use sched_getaffinity if available. Will apply tomorrow. Regards, Marton > > Signed-off-by: Marton Balint > --- > libavutil/cpu.c | 16 +++++++++------- > 1 file changed, 9 insertions(+), 7 deletions(-) > > diff --git a/libavutil/cpu.c b/libavutil/cpu.c > index 833c220192..24b99d2554 100644 > --- a/libavutil/cpu.c > +++ b/libavutil/cpu.c > @@ -16,6 +16,15 @@ > * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA > */ > > +#include "config.h" > + > +#if HAVE_SCHED_GETAFFINITY > +#ifndef _GNU_SOURCE > +# define _GNU_SOURCE > +#endif > +#include > +#endif > + > #include > #include > #include > @@ -23,16 +32,9 @@ > #include "attributes.h" > #include "cpu.h" > #include "cpu_internal.h" > -#include "config.h" > #include "opt.h" > #include "common.h" > > -#if HAVE_SCHED_GETAFFINITY > -#ifndef _GNU_SOURCE > -# define _GNU_SOURCE > -#endif > -#include > -#endif > #if HAVE_GETPROCESSAFFINITYMASK || HAVE_WINRT > #include > #endif > -- > 2.31.1 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".