From patchwork Fri Dec 9 01:50:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Oberritter X-Patchwork-Id: 1735 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.65.86 with SMTP id o83csp504521vsa; Fri, 9 Dec 2016 12:15:15 -0800 (PST) X-Received: by 10.194.111.231 with SMTP id il7mr68222567wjb.52.1481314515049; Fri, 09 Dec 2016 12:15:15 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id k24si19357384wmi.156.2016.12.09.12.15.14; Fri, 09 Dec 2016 12:15:15 -0800 (PST) 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 53EB568A0F1; Fri, 9 Dec 2016 22:15:08 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail.saftware.de (mail.saftware.de [83.141.3.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8E565689FE4 for ; Fri, 9 Dec 2016 03:50:46 +0200 (EET) Received: by t510.zcs.saftware.de (Postfix, from userid 1000) id BD0AAB85907; Fri, 9 Dec 2016 02:50:47 +0100 (CET) From: Andreas Oberritter To: ffmpeg-devel@ffmpeg.org Date: Fri, 9 Dec 2016 02:50:47 +0100 Message-Id: <1481248247-7778-1-git-send-email-obi@saftware.de> X-Mailer: git-send-email 2.7.4 X-Mailman-Approved-At: Fri, 09 Dec 2016 22:15:07 +0200 Subject: [FFmpeg-devel] [PATCH] avutil/log: avoid build error if valgrind was removed after configure 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" In an automated build system, where valgrind and ffmpeg get updated in parallel, a race condition may occur in which valgrind/valgrind.h is available when configure runs but not if libavutil/log.c gets compiled. Using CONFIG_VALGRIND_BACKTRACE helps to avoid this problem, because it allows to prevent the inclusion of the autodetected valgrind.h by using a configure switch. Signed-off-by: Andreas Oberritter --- Please put me on CC: when replying, as I'm not subscribed to the list. libavutil/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/log.c b/libavutil/log.c index 44c11cb..202c0f1 100644 --- a/libavutil/log.c +++ b/libavutil/log.c @@ -47,7 +47,7 @@ static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; #define LINE_SZ 1024 -#if HAVE_VALGRIND_VALGRIND_H +#if CONFIG_VALGRIND_BACKTRACE #include /* this is the log level at which valgrind will output a full backtrace */ #define BACKTRACE_LOGLEVEL AV_LOG_ERROR