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

Reimar Döffinger Reimar.Doeffinger
Fri Dec 12 23:52:24 CET 2008

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
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
(though I this "magic" could be done in the Makefile, too, I just don't
know how).

Reimar D?ffinger

More information about the ffmpeg-devel mailing list