diff --git a/gst/gstpoll.c b/gst/gstpoll.c
index 95be70e..6c18acb 100644
--- a/gst/gstpoll.c
+++ b/gst/gstpoll.c
@@ -688,8 +688,10 @@ gst_poll_get_read_gpollfd (GstPoll * set, GPollFD * fd)
 
 #ifndef G_OS_WIN32
   fd->fd = set->control_read_fd.fd;
+#elif GLIB_SIZEOF_VOID_P == 8
+  fd->fd = (gint64) set->wakeup_event;
 #else
-  fd->fd = set->wakeup_event;
+  fd->fd = (gint) set->wakeup_event;
 #endif
   fd->events = G_IO_IN | G_IO_HUP | G_IO_ERR;
   fd->revents = 0;
