[SCM] libav/experimental: ensure we get explicit definition of various _XOPEN_SOURCE functions we use

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:27:37 UTC 2013


The following commit has been merged in the experimental branch:
commit 7246177d806d607c4a31fd59ef355f0f25c7ab36
Author: Aurelien Jacobs <aurel at gnuage.org>
Date:   Thu Aug 14 22:01:59 2008 +0000

    ensure we get explicit definition of various _XOPEN_SOURCE functions we use
    
    Originally committed as revision 14766 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/ffmpeg.c b/ffmpeg.c
index 53009d3..07c3ac4 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -19,6 +19,9 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+/* needed for usleep() */
+#define _XOPEN_SOURCE 500
+
 #include "config.h"
 #include <ctype.h>
 #include <string.h>
@@ -27,6 +30,7 @@
 #include <errno.h>
 #include <signal.h>
 #include <limits.h>
+#include <unistd.h>
 #include "libavformat/avformat.h"
 #include "libavdevice/avdevice.h"
 #include "libswscale/swscale.h"
@@ -45,7 +49,6 @@
 #endif
 
 #if defined(HAVE_TERMIOS_H)
-#include <unistd.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
 #include <sys/time.h>
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 8ca19ae..6e5c40a 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -25,6 +25,9 @@
  * utils.
  */
 
+/* needed for mkstemp() */
+#define _XOPEN_SOURCE 500
+
 #include "libavutil/integer.h"
 #include "libavutil/crc.h"
 #include "avcodec.h"
@@ -32,6 +35,7 @@
 #include "opt.h"
 #include "imgconvert.h"
 #include "audioconvert.h"
+#include <stdlib.h>
 #include <stdarg.h>
 #include <limits.h>
 #include <float.h>
diff --git a/libavformat/os_support.c b/libavformat/os_support.c
index cc109d5..3357595 100644
--- a/libavformat/os_support.c
+++ b/libavformat/os_support.c
@@ -19,6 +19,10 @@
  * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
+
+/* needed by inet_aton() */
+#define _SVID_SOURCE
+
 #include "config.h"
 #include "avformat.h"
 #include <unistd.h>
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index e469a59..3500cad 100644
--- a/libavformat/rtpdec.c
+++ b/libavformat/rtpdec.c
@@ -19,6 +19,9 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+/* needed for gethostname() */
+#define _XOPEN_SOURCE 500
+
 #include "libavcodec/bitstream.h"
 #include "avformat.h"
 #include "mpegts.h"
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index d1f454d..a3af365 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -19,6 +19,9 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+/* needed by inet_aton() */
+#define _SVID_SOURCE
+
 #include "libavutil/avstring.h"
 #include "avformat.h"
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list