From 09bbc1493d723d6b3ecdaa392855c50d4d972e01 Mon Sep 17 00:00:00 2001 From: Andoni Morales Alastruey Date: Wed, 17 Feb 2010 01:27:22 +0100 Subject: [PATCH] Fix compilation of fdsink and fdsrc with MSVC --- plugins/elements/gstelements.c | 4 ++++ plugins/elements/gstfdsink.c | 7 ++++++- plugins/elements/gstfdsrc.c | 7 ++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/plugins/elements/gstelements.c b/plugins/elements/gstelements.c index bc5f50b..7835a2b 100644 --- a/plugins/elements/gstelements.c +++ b/plugins/elements/gstelements.c @@ -57,6 +57,10 @@ static struct _elements_entry _elements[] = { {"fdsrc", GST_RANK_NONE, gst_fd_src_get_type}, {"fdsink", GST_RANK_NONE, gst_fd_sink_get_type}, #endif +#ifdef _MSC_VER + {"fdsrc", GST_RANK_NONE, gst_fd_src_get_type}, + {"fdsink", GST_RANK_NONE, gst_fd_sink_get_type}, +#endif {"filesrc", GST_RANK_PRIMARY, gst_file_src_get_type}, {"identity", GST_RANK_NONE, gst_identity_get_type}, {"queue", GST_RANK_NONE, gst_queue_get_type}, diff --git a/plugins/elements/gstfdsink.c b/plugins/elements/gstfdsink.c index f469449..9102185 100644 --- a/plugins/elements/gstfdsink.c +++ b/plugins/elements/gstfdsink.c @@ -50,14 +50,19 @@ #endif #include +#ifdef HAVE_SYS_SOCKET_H #include +#endif #include #include #ifdef HAVE_UNISTD_H #include #endif #ifdef _MSC_VER -#include +#undef stat +#define stat _stat +#define fstat _fstat +#define S_ISREG(m) (((m)&S_IFREG)==S_IFREG) #endif #include #include diff --git a/plugins/elements/gstfdsrc.c b/plugins/elements/gstfdsrc.c index 0683a2c..36abcd7 100644 --- a/plugins/elements/gstfdsrc.c +++ b/plugins/elements/gstfdsrc.c @@ -71,14 +71,19 @@ #endif #include +#ifdef HAVE_SYS_SOCKET_H #include +#endif #include #include #ifdef HAVE_UNISTD_H #include #endif #ifdef _MSC_VER -#include +#undef stat +#define stat _stat +#define fstat _fstat +#define S_ISREG(m) (((m)&S_IFREG)==S_IFREG) #endif #include #include -- 2.7.4