[FFmpeg-devel] [PATCH] define _BSD_SOURCE for bktr.c

Reimar Döffinger Reimar.Doeffinger
Sat Dec 13 09:31:00 CET 2008


On Sat, Dec 13, 2008 at 01:10:38AM +0000, Jacob Meuser wrote:
> On Fri, Dec 12, 2008 at 11:52:24PM +0100, Reimar D?ffinger wrote:
> > the dev/ic/bt8xx.h header needs types like u_short which for OpenBSD
> > are defined by sys/types.h but only when _BSD_SOURCE is defined before it gets
> > included.
> 
> what version of openbsd?  I maintain the openbsd port/package.  I have
> never had an issue with this.  granted, I haven't tried updating
> ffmpeg in a few months ...

OpenBSD 4.4, fresh installed...
Seeing that this header requires u_short etc. should be trivial,
and this is the code in types.h:

> #if __BSD_VISIBLE
> typedef unsigned char   u_char;
> typedef unsigned short  u_short;
> typedef unsigned int    u_int;
> typedef unsigned long   u_long;

__BSD_VISIBLE is from cdefs.h:
#if !defined(_BSD_SOURCE) && \
   (defined(_ANSI_SOURCE) || defined(__XPG_VISIBLE) || defined(__POSIX_VISIBLE))
# define __BSD_VISIBLE          0
#endif
#ifndef __BSD_VISIBLE
# define __BSD_VISIBLE          1   
#endif




More information about the ffmpeg-devel mailing list