From 63234a9dab0e92642666de278cd61a87ca40f394 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Raimo=20J=C3=A4rvi?= Date: Sat, 5 May 2012 22:17:43 +0300 Subject: [PATCH] gst: Fix compiler warnings on mingw-w64 https://bugzilla.gnome.org/show_bug.cgi?id=675525 --- gst/gstpoll.c | 1 - gst/gstsystemclock.c | 2 ++ plugins/elements/gstfilesrc.c | 2 ++ tests/check/elements/filesrc.c | 2 ++ tests/check/gst/gstpoll.c | 1 - 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gst/gstpoll.c b/gst/gstpoll.c index 7aab1d1..77be7e3 100644 --- a/gst/gstpoll.c +++ b/gst/gstpoll.c @@ -72,7 +72,6 @@ #ifdef G_OS_WIN32 #include -#define EINPROGRESS WSAEINPROGRESS #else #define _GNU_SOURCE 1 #ifdef HAVE_SYS_POLL_H diff --git a/gst/gstsystemclock.c b/gst/gstsystemclock.c index 7c461c9..9cac9ee 100644 --- a/gst/gstsystemclock.c +++ b/gst/gstsystemclock.c @@ -52,7 +52,9 @@ # define WIN32_LEAN_AND_MEAN /* prevents from including too many things */ # include /* 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))) diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c index 26bd4a8..8536f4a 100644 --- a/plugins/elements/gstfilesrc.c +++ b/plugins/elements/gstfilesrc.c @@ -47,7 +47,9 @@ #include /* 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 diff --git a/tests/check/elements/filesrc.c b/tests/check/elements/filesrc.c index 8fd9bc2..2a3fac4 100644 --- a/tests/check/elements/filesrc.c +++ b/tests/check/elements/filesrc.c @@ -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) { diff --git a/tests/check/gst/gstpoll.c b/tests/check/gst/gstpoll.c index 612cda1..d25c421 100644 --- a/tests/check/gst/gstpoll.c +++ b/tests/check/gst/gstpoll.c @@ -26,7 +26,6 @@ #ifdef G_OS_WIN32 #include #include -#define EINPROGRESS WSAEINPROGRESS #else #include #endif -- 2.7.4