Use fcntl() instead to set O_NONBLOCK, which is portable. https://bugzilla.gnome.org/show_bug.cgi?id=786763