From owner-freebsd-multimedia@FreeBSD.ORG Sun Dec 12 21:08:59 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 99A79106564A; Sun, 12 Dec 2010 21:08:59 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id A6D0D8FC08; Sun, 12 Dec 2010 21:08:58 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id XAA07141; Sun, 12 Dec 2010 23:08:56 +0200 (EET) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1PRtA8-000CBs-2b; Sun, 12 Dec 2010 23:08:56 +0200 Message-ID: <4D0539E7.6080805@freebsd.org> Date: Sun, 12 Dec 2010 23:08:55 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: Kostik Belousov References: <4D05332C.7010208@freebsd.org> <20101212204541.GA33073@deviant.kiev.zoral.com.ua> <4D0535FB.1090102@freebsd.org> In-Reply-To: <4D0535FB.1090102@freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-multimedia@freebsd.org, Martin Matuska 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:08:59 -0000 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. -- Andriy Gapon