Am Samstag, den 14.05.2011, 21:10 +0200 schrieb Diego Biurrun: > On Sat, May 14, 2011 at 05:29:42PM +0200, Reinhard Tartler wrote: > > Am Samstag, den 14.05.2011, 11:24 -0400 schrieb Brad: > > > On 14/05/11 11:15 AM, Reinhard Tartler wrote: > > > > Am Samstag, den 14.05.2011, 11:08 -0400 schrieb Brad: > > > >> On 14/05/11 10:26 AM, Reinhard Tartler wrote: > > > >>> This partly reverts 046f081b46c8479820409cf8f530b988221bd15b for > > > >>> libavdevoce/bktr.c. While _XOPEN_SOURCE and _NETBSD_SOURCE can be > > > >>> dropped, _BSD_SOURCE is still needed. > > > >>> --- > > > >>> libavdevice/bktr.c | 2 ++ > > > >>> 1 files changed, 2 insertions(+), 0 deletions(-) > > > >>> > > > >>> diff --git a/libavdevice/bktr.c b/libavdevice/bktr.c > > > >>> index dad5c83..3c7a8b4 100644 > > > >>> --- a/libavdevice/bktr.c > > > >>> +++ b/libavdevice/bktr.c > > > >>> @@ -24,6 +24,8 @@ > > > >>> * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > > > >>> 02110-1301 USA > > > >>> */ > > > >>> > > > >>> +#define _BSD_SOURCE /* needed for caddr_t from<sys/types.h>*/ > > > >>> + > > > >>> #include "libavformat/avformat.h" > > > >>> #if HAVE_DEV_BKTR_IOCTL_METEOR_H&& HAVE_DEV_BKTR_IOCTL_BT848_H > > > >>> # include<dev/bktr/ioctl_meteor.h> > > > >> > > > >> Can you provide a bit more detail about the build error whomever > > > >> reported? This isn't necessary for OpenBSD and as far as I know > > > >> FreeBSD / DragonFly were fine so only NetBSD might need this and > > > >> from looking at sys/types.h I see no indication this should be either. > > > > > > > > Sure, have a look at these two buildlogs: > > > > > > > > https://buildd.debian.org/status/fetch.php?pkg=libav&arch=kfreebsd-amd64&ver=4%3A0.7%7Ebeta2-1&stamp=1305297652 > > > > > > > > https://buildd.debian.org/status/fetch.php?pkg=libav&arch=kfreebsd-i386&ver=4%3A0.7%7Ebeta2-1&stamp=1305296011 > > > > > > Then IMO _BSD_SOURCE should be added to add_cppflags just for kFreeBSD > > > in the configure script. > > > > Well, it's just libavdevice/bktr.c that requires it (for caddr_t). If > > Diego/Mans agree that enabling it globally for all files, then I'll > > squash my two kfreebsd commits into one. > > I prefert to add it globally for kfreebsd.
Here we go: commit afb05fdf485a6d4ddef096030b2161f57eb903c0 Author: Reinhard Tartler <[email protected]> Date: Sat May 14 16:10:30 2011 +0200 use same CPP flags in kFreeBSD as Linux 046f081b46c8479820409cf8f530b988221bd15b reorganized CPP flags to no longer unconditionally add -D_POSIX_C_SOURCE to CPPFLAGS but only on systems (e.g., glibc based ones) that require it. As kFreeBSD is using glibc, it needs to be treated the same. Moreover, additionally _BSD_SOURCE is turned on to enable some additional types such as caddr_t, which are normally enabled on BSD but not with glibc. Modified configure diff --git a/configure b/configure index d527ed1..970ec56 100755 --- a/configure +++ b/configure @@ -2487,6 +2487,7 @@ case $target_os in enable dos_paths ;; gnu/kfreebsd) + add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE ;; gnu) ;; _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
