From 7246177d806d607c4a31fd59ef355f0f25c7ab36 Mon Sep 17 00:00:00 2001 From: Aurelien Jacobs Date: Thu, 14 Aug 2008 22:01:59 +0000 Subject: [PATCH] ensure we get explicit definition of various _XOPEN_SOURCE functions we use Originally committed as revision 14766 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffmpeg.c | 5 ++++- libavcodec/utils.c | 4 ++++ libavformat/os_support.c | 4 ++++ libavformat/rtpdec.c | 3 +++ libavformat/rtsp.c | 3 +++ 5 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ffmpeg.c b/ffmpeg.c index 53009d395f..07c3ac41f4 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 #include @@ -27,6 +30,7 @@ #include #include #include +#include #include "libavformat/avformat.h" #include "libavdevice/avdevice.h" #include "libswscale/swscale.h" @@ -45,7 +49,6 @@ #endif #if defined(HAVE_TERMIOS_H) -#include #include #include #include diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 8ca19aed00..6e5c40a588 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 #include #include #include diff --git a/libavformat/os_support.c b/libavformat/os_support.c index cc109d5967..3357595590 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 diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index e469a597c3..3500cad717 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 d1f454da16..a3af365cae 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"