From c573f74d34c469e3c437b974be61fecd43a31f1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Wed, 25 May 2011 12:47:51 +0400 Subject: [PATCH] poll: Fix WAKE_EVENT() to behave posixly on Windows --- gst/gstpoll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/gstpoll.c b/gst/gstpoll.c index 76a7a30e6a..8bb282a92f 100644 --- a/gst/gstpoll.c +++ b/gst/gstpoll.c @@ -165,7 +165,7 @@ static gboolean gst_poll_add_fd_unlocked (GstPoll * set, GstPollFD * fd); #define WAKE_EVENT(s) (write ((s)->control_write_fd.fd, "W", 1) == 1) #define RELEASE_EVENT(s) (read ((s)->control_read_fd.fd, (s)->buf, 1) == 1) #else -#define WAKE_EVENT(s) (SetEvent ((s)->wakeup_event)) +#define WAKE_EVENT(s) (SetEvent ((s)->wakeup_event), errno = GetLastError () == NO_ERROR ? 0 : EACCES, errno == 0 ? 1 : 0) #define RELEASE_EVENT(s) (ResetEvent ((s)->wakeup_event)) #endif