fdsink.c: fix G_OS_WIN32 #ifdef

Postpone the #ifdef to a point after glib.h (via gstfdsink.h) is included
so that the needed defines and header includes can be done correctly,
especially on Visual C++ builds.

https://bugzilla.gnome.org/show_bug.cgi?id=679112
This commit is contained in:
Chun-wei Fan 2012-06-29 10:56:34 +08:00 committed by Tim-Philipp Müller
parent 40e68e7760
commit cb5e8f2bb4

View file

@ -41,14 +41,6 @@
#include <sys/types.h>
#ifdef G_OS_WIN32
#include <io.h> /* lseek, open, close, read */
#undef lseek
#define lseek _lseeki64
#undef off_t
#define off_t guint64
#endif
#include <sys/stat.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
@ -69,6 +61,14 @@
#include "gstfdsink.h"
#ifdef G_OS_WIN32
#include <io.h> /* lseek, open, close, read */
#undef lseek
#define lseek _lseeki64
#undef off_t
#define off_t guint64
#endif
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,