From owner-freebsd-multimedia@FreeBSD.ORG Sun Dec 12 21:29:01 2010 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DAF8106564A; Sun, 12 Dec 2010 21:29:01 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mail.vx.sk (mail.vx.sk [IPv6:2a01:4f8:100:1043::3]) by mx1.freebsd.org (Postfix) with ESMTP id 22EC18FC14; Sun, 12 Dec 2010 21:29:01 +0000 (UTC) Received: from core.vx.sk (localhost [127.0.0.1]) by mail.vx.sk (Postfix) with ESMTP id 3425812FFD0; Sun, 12 Dec 2010 22:29:00 +0100 (CET) X-Virus-Scanned: amavisd-new at mail.vx.sk Received: from mail.vx.sk ([127.0.0.1]) by core.vx.sk (mail.vx.sk [127.0.0.1]) (amavisd-new, port 10024) with LMTP id LMJjajPTlkGO; Sun, 12 Dec 2010 22:28:58 +0100 (CET) Received: from [10.9.8.3] (188-167-78-139.dynamic.chello.sk [188.167.78.139]) by mail.vx.sk (Postfix) with ESMTPSA id EFCBD12FFC5; Sun, 12 Dec 2010 22:28:57 +0100 (CET) Message-ID: <4D053E99.7090401@FreeBSD.org> Date: Sun, 12 Dec 2010 22:28:57 +0100 From: Martin Matuska User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Andriy Gapon References: <4D05332C.7010208@freebsd.org> <20101212204541.GA33073@deviant.kiev.zoral.com.ua> <4D0535FB.1090102@freebsd.org> <4D0539E7.6080805@freebsd.org> In-Reply-To: <4D0539E7.6080805@freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: freebsd-multimedia@freebsd.org Subject: Re: ffmpeg and mmap X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2010 21:29:01 -0000 Lets see what we can read about this from ffmpeg history: I tracked it down to this git commit of ffmpeg: http://git.ffmpeg.org/?p=ffmpeg;a=commit;h=00dd86329f892c6fdf641c4cc8b0497ff232d2e9 The commit ressults from a discussion in this thread: http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-August/051220.html I personally think we can remove it from CFLAGS in our case. Dňa 12.12.2010 22:08, Andriy Gapon wrote / napísal(a): > on 12/12/2010 22:52 Andriy Gapon said the following: >> on 12/12/2010 22:45 Kostik Belousov said the following: >>> On Sun, Dec 12, 2010 at 10:40:12PM +0200, Andriy Gapon wrote: >>>> To get around that issue _on Linux_, ffmpeg folks have put explicit >>>> _SVID_SOURCE definition right into the libswscale/utils.c file: >>>> #define _SVID_SOURCE //needed for MAP_ANONYMOUS >>>> >>>> For much the same reason we need to add the following for FreeBSD (as >>>> hackish as it is): #define __BSD_VISIBLE 1 >>>> >>>> With that addition the code buffer is allocated properly and the code >>>> in it can be executed. >>> Applications should never define the symbols from reserved namespace, >>> in this case __BSD_VISIBLE. Right solution is to not define _POSIX_SOURCE. >> i agree with you, but I don't know why the ffmpeg folks decided to use >> _POSIX_C_SOURCE=200112 in the first place and what could break without it. >> > Actually the port seems to compile and work without any problems if I remove > _POSIX_C_SOURCE definition in two places in configure. >