diff --git a/gst/elements/gstelements.c b/gst/elements/gstelements.c index 66f91add8f..b5327170ff 100644 --- a/gst/elements/gstelements.c +++ b/gst/elements/gstelements.c @@ -51,9 +51,9 @@ static struct _elements_entry _elements[] = { {"capsfilter", GST_RANK_NONE, gst_capsfilter_get_type}, {"fakesrc", GST_RANK_NONE, gst_fake_src_get_type}, {"fakesink", GST_RANK_NONE, gst_fake_sink_get_type}, -#ifndef WIN32 +#ifndef HAVE_WIN32 {"fdsrc", GST_RANK_NONE, gst_fdsrc_get_type}, -#endif //WIN32 +#endif {"filesrc", GST_RANK_NONE, gst_file_src_get_type}, {"identity", GST_RANK_NONE, gst_identity_get_type}, {"filesink", GST_RANK_NONE, gst_file_sink_get_type}, diff --git a/gst/elements/gstfilesrc.c b/gst/elements/gstfilesrc.c index ec15585ce3..4f5666552c 100644 --- a/gst/elements/gstfilesrc.c +++ b/gst/elements/gstfilesrc.c @@ -39,12 +39,19 @@ #include #include #include + #ifdef HAVE_UNISTD_H -#include +# include #endif + #ifdef HAVE_MMAP -#include +# include #endif + +#ifdef HAVE_WIN32 +# include /* lseek, open, close, read */ +#endif + #include #include @@ -732,7 +739,7 @@ gst_file_src_create_read (GstFileSrc * src, guint64 offset, guint length, goto could_not_read; /* regular files should have given us what we expected */ - if ((gint) ret < length && src->is_regular) + if ((guint) ret < length && src->is_regular) goto unexpected_eos; /* other files should eos if they read 0 */ diff --git a/plugins/elements/gstelements.c b/plugins/elements/gstelements.c index 66f91add8f..b5327170ff 100644 --- a/plugins/elements/gstelements.c +++ b/plugins/elements/gstelements.c @@ -51,9 +51,9 @@ static struct _elements_entry _elements[] = { {"capsfilter", GST_RANK_NONE, gst_capsfilter_get_type}, {"fakesrc", GST_RANK_NONE, gst_fake_src_get_type}, {"fakesink", GST_RANK_NONE, gst_fake_sink_get_type}, -#ifndef WIN32 +#ifndef HAVE_WIN32 {"fdsrc", GST_RANK_NONE, gst_fdsrc_get_type}, -#endif //WIN32 +#endif {"filesrc", GST_RANK_NONE, gst_file_src_get_type}, {"identity", GST_RANK_NONE, gst_identity_get_type}, {"filesink", GST_RANK_NONE, gst_file_sink_get_type}, diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c index ec15585ce3..4f5666552c 100644 --- a/plugins/elements/gstfilesrc.c +++ b/plugins/elements/gstfilesrc.c @@ -39,12 +39,19 @@ #include #include #include + #ifdef HAVE_UNISTD_H -#include +# include #endif + #ifdef HAVE_MMAP -#include +# include #endif + +#ifdef HAVE_WIN32 +# include /* lseek, open, close, read */ +#endif + #include #include @@ -732,7 +739,7 @@ gst_file_src_create_read (GstFileSrc * src, guint64 offset, guint length, goto could_not_read; /* regular files should have given us what we expected */ - if ((gint) ret < length && src->is_regular) + if ((guint) ret < length && src->is_regular) goto unexpected_eos; /* other files should eos if they read 0 */