[FFmpeg-devel] [PATCH] define _BSD_SOURCE for bktr.c
Sat Dec 13 00:41:39 CET 2008
Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> writes:
> 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.
Someone should pay them a visit bringing a very large LART.
> I haven't found a less ugly way to fix it but this:
> diff --git a/libavdevice/bktr.c b/libavdevice/bktr.c
> index 7b37f11..7d9abee 100644
> --- a/libavdevice/bktr.c
> +++ b/libavdevice/bktr.c
> @@ -24,6 +24,7 @@
> * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> * 02110-1301 USA
> +#define _BSD_SOURCE
> #include "libavformat/avformat.h"
> #if defined (HAVE_DEV_BKTR_IOCTL_METEOR_H) && defined (HAVE_DEV_BKTR_IOCTL_BT848_H)
> # include <dev/bktr/ioctl_meteor.h>
> But since this is a BSD-specific file after all it might be appropriate
The patch looks OK to me. There doesn't seem to be a maintainer for
that file, so go ahead and apply.
> (though I this "magic" could be done in the Makefile, too, I just don't
> know how).
Doing it in the makefile doesn't gain anything here since the #define
is constant and unconditional.
mans at mansr.com
More information about the ffmpeg-devel