From: Andoni Morales Alastruey Date: Wed, 17 Feb 2010 00:27:22 +0000 (+0100) Subject: Fix compilation of fdsink and fdsrc with MSVC X-Git-Tag: RELEASE-0.10.27~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=09bbc1493d723d6b3ecdaa392855c50d4d972e01;p=platform%2Fupstream%2Fgstreamer.git Fix compilation of fdsink and fdsrc with MSVC --- 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