Fix compilation of fdsink and fdsrc with MSVC

This commit is contained in:
Andoni Morales Alastruey 2010-02-17 01:27:22 +01:00 committed by Sebastian Dröge
parent 6a4491efa9
commit 09bbc1493d
3 changed files with 16 additions and 2 deletions

View file

@ -56,6 +56,10 @@ static struct _elements_entry _elements[] = {
#ifdef HAVE_SYS_SOCKET_H
{"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},

View file

@ -50,14 +50,19 @@
#endif
#include <sys/stat.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <fcntl.h>
#include <stdio.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef _MSC_VER
#include <io.h>
#undef stat
#define stat _stat
#define fstat _fstat
#define S_ISREG(m) (((m)&S_IFREG)==S_IFREG)
#endif
#include <errno.h>
#include <string.h>

View file

@ -71,14 +71,19 @@
#endif
#include <sys/stat.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <fcntl.h>
#include <stdio.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef _MSC_VER
#include <io.h>
#undef stat
#define stat _stat
#define fstat _fstat
#define S_ISREG(m) (((m)&S_IFREG)==S_IFREG)
#endif
#include <stdlib.h>
#include <errno.h>