libavdevice: Define _XOPEN_SOURCE for usleep

Message ID 1303383151-92271-1-git-send-email-martin@martin.st
State Committed
Commit 32a128522ad392d2bca67165fda1d2fe30262189
Headers show

Commit Message

Martin Storsjö April 21, 2011, 10:52 a.m.
This hopefully fixes build failures on Dragonfly BSD.
---
It's untested in practice, but all other files that use usleep
define _XOPEN_SOURCE=600.

 libavdevice/bktr.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Diego Biurrun April 21, 2011, 11:10 a.m. | #1
On Thu, Apr 21, 2011 at 01:52:31PM +0300, Martin Storsjö wrote:
> This hopefully fixes build failures on Dragonfly BSD.
> ---
> It's untested in practice, but all other files that use usleep
> define _XOPEN_SOURCE=600.


Should be OK if even for consistency, so go for it and push.

Diego

Patch

diff --git a/libavdevice/bktr.c b/libavdevice/bktr.c
index 3e705a0..ab70a1b 100644
--- a/libavdevice/bktr.c
+++ b/libavdevice/bktr.c
@@ -26,6 +26,7 @@ 
 
 #define _BSD_SOURCE 1
 #define _NETBSD_SOURCE
+#define _XOPEN_SOURCE 600
 
 #include "libavformat/avformat.h"
 #if HAVE_DEV_BKTR_IOCTL_METEOR_H && HAVE_DEV_BKTR_IOCTL_BT848_H