From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6150 Path: news.gmane.org!not-for-mail From: Natanael Copa Newsgroups: gmane.linux.lib.musl.general Subject: Re: why is there no __MUSL__ macro? Date: Thu, 11 Sep 2014 16:47:11 +0200 Message-ID: <20140911164711.248bf3d7@ncopa-desktop.alpinelinux.org> References: <541180B9.5070604@posteo.de> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1410446871 26595 80.91.229.3 (11 Sep 2014 14:47:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Sep 2014 14:47:51 +0000 (UTC) Cc: musl@lists.openwall.com To: =?ISO-8859-1?B?SvZyZw==?= Krause Original-X-From: musl-return-6163-gllmg-musl=m.gmane.org@lists.openwall.com Thu Sep 11 16:47:41 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1XS5ei-0001T0-6e for gllmg-musl@plane.gmane.org; Thu, 11 Sep 2014 16:47:28 +0200 Original-Received: (qmail 16163 invoked by uid 550); 11 Sep 2014 14:47:27 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 16148 invoked from network); 11 Sep 2014 14:47:27 -0000 In-Reply-To: <541180B9.5070604@posteo.de> X-Mailer: Claws Mail 3.10.1-156-gb29a92 (GTK+ 2.24.23; x86_64-unknown-linux-gnu) Xref: news.gmane.org gmane.linux.lib.musl.general:6150 Archived-At: On Thu, 11 Sep 2014 13:00:09 +0200 J=F6rg Krause wrote: > Hi, >=20 > I am trying to add support for the musl toolchain to FFmpeg. >=20 > FFmpeg needs support for library features defined in POSIX.1-2001 with=20 > XSI extension and the standards below. Currently configure probes the=20 > host and target libc by checking for defined macros like __GLIBC__ and=20 > __UCLIBC__. In case of glibc and uclibc it sets -D_XOPEN_SOURCE=3D600=20 > properly. >=20 > After this it checks for some combinations of hardware and the probed=20 > libc to set some more compile options, if necessary. >=20 > I know that musl does not have a macro __MUSL__ and I have read the=20 > explanation. However, I don't understand what's meant by "[..] it's a=20 > bug to assume a certain implementation has particular properties rather=20 > than testing." and how does it affect the way FFmpeg probes for the libc. >=20 > What could be a solution which supports musl? >=20 > Many thanks! > J=F6rg This is what we do on alpine linux: http://git.alpinelinux.org/cgit/aports/tree/main/ffmpeg/fix-defines.patch --- ffmpeg-1.2.2.orig/libavutil/error.c +++ ffmpeg-1.2.2/libavutil/error.c @@ -17,6 +17,7 @@ */ =20 #undef _GNU_SOURCE +#define _XOPEN_SOURCE 600 #include "avutil.h" #include "avstring.h" #include "common.h"