mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
Fix poll able streams for Darwin (and probably BSD)
Darwin's poll doesn't change revents if there are no available events, though it returns 0. Initialize the fd.revents to 0 so that the test passes. That reveals a test failure, though, because with socket streams it takes time for an event to pass through the socket. Provide an 80-usec delay to allow time for the propagation.
This commit is contained in:
@@ -532,6 +532,7 @@ g_unix_output_stream_pollable_is_writable (GPollableOutputStream *stream)
|
||||
|
||||
poll_fd.fd = unix_stream->priv->fd;
|
||||
poll_fd.events = G_IO_OUT;
|
||||
poll_fd.revents = 0;
|
||||
|
||||
do
|
||||
result = g_poll (&poll_fd, 1, 0);
|
||||
|
Reference in New Issue
Block a user