gst: Fix compiler warnings on mingw-w64
authorRaimo Järvi <raimo.jarvi@gmail.com>
Sat, 5 May 2012 19:17:43 +0000 (22:17 +0300)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 9 May 2012 07:35:35 +0000 (09:35 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=675525

gst/gstpoll.c
gst/gstsystemclock.c
plugins/elements/gstfilesrc.c
tests/check/elements/filesrc.c
tests/check/gst/gstpoll.c

index 7aab1d1..77be7e3 100644 (file)
@@ -72,7 +72,6 @@
 
 #ifdef G_OS_WIN32
 #include <winsock2.h>
-#define EINPROGRESS WSAEINPROGRESS
 #else
 #define _GNU_SOURCE 1
 #ifdef HAVE_SYS_POLL_H
index 7c461c9..9cac9ee 100644 (file)
@@ -52,7 +52,9 @@
 #  define WIN32_LEAN_AND_MEAN   /* prevents from including too many things */
 #  include <windows.h>          /* QueryPerformance* stuff */
 #  undef WIN32_LEAN_AND_MEAN
+#  ifndef EWOULDBLOCK
 #  define EWOULDBLOCK EAGAIN    /* This is just to placate gcc */
+#  endif
 #endif /* G_OS_WIN32 */
 
 #define GET_ENTRY_STATUS(e)          ((GstClockReturn) g_atomic_int_get(&GST_CLOCK_ENTRY_STATUS(e)))
index 26bd4a8..8536f4a 100644 (file)
@@ -47,7 +47,9 @@
 #include <io.h>                 /* lseek, open, close, read */
 /* On win32, stat* default to 32 bit; we need the 64-bit
  * variants, so explicitly define it that way. */
+#undef stat
 #define stat __stat64
+#undef fstat
 #define fstat _fstat64
 #undef lseek
 #define lseek _lseeki64
index 8fd9bc2..2a3fac4 100644 (file)
@@ -404,6 +404,7 @@ GST_START_TEST (test_uri_interface)
 
 GST_END_TEST;
 
+#ifdef G_OS_UNIX
 static void
 check_uri_for_uri (GstElement * e, const gchar * in_uri, const gchar * uri)
 {
@@ -459,6 +460,7 @@ check_uri_for_location (GstElement * e, const gchar * location,
 
   g_free (query_uri);
 }
+#endif
 
 GST_START_TEST (test_uri_query)
 {
index 612cda1..d25c421 100644 (file)
@@ -26,7 +26,6 @@
 #ifdef G_OS_WIN32
 #include <winsock2.h>
 #include <fcntl.h>
-#define EINPROGRESS WSAEINPROGRESS
 #else
 #include <sys/socket.h>
 #endif