gvfs r2234 - in trunk: . client
- From: alexl svn gnome org
- To: svn-commits-list gnome org
- Subject: gvfs r2234 - in trunk: . client
- Date: Wed, 18 Feb 2009 14:07:47 +0000 (UTC)
Author: alexl
Date: Wed Feb 18 14:07:47 2009
New Revision: 2234
URL: http://svn.gnome.org/viewvc/gvfs?rev=2234&view=rev
Log:
2009-02-18 Alexander Larsson <alexl redhat com>
Bug 563623 â build dies on platforms lacking poll() implimentation
* client/gvfsdaemondbus.c:
(setup_async_fd_receive):
(_g_vfs_daemon_call_sync):
Use g_poll instead of poll.
Patch from ephraim_owns hotmail com
Modified:
trunk/ChangeLog
trunk/client/gvfsdaemondbus.c
Modified: trunk/client/gvfsdaemondbus.c
==============================================================================
--- trunk/client/gvfsdaemondbus.c (original)
+++ trunk/client/gvfsdaemondbus.c Wed Feb 18 14:07:47 2009
@@ -29,7 +29,6 @@
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
-#include <poll.h>
#include <glib/gi18n-lib.h>
@@ -301,7 +300,7 @@
connection_data->extra_fd_source =
- __g_fd_source_new (connection_data->extra_fd, POLLIN|POLLERR, NULL);
+ __g_fd_source_new (connection_data->extra_fd, G_IO_IN|G_IO_ERR, NULL);
g_source_set_callback (connection_data->extra_fd_source,
(GSourceFunc)async_connection_accept_new_fd,
connection_data, NULL);
@@ -745,16 +744,16 @@
sent_cancel = (cancel_fd == -1);
while (!dbus_pending_call_get_completed (pending))
{
- struct pollfd poll_fds[2];
+ GPollFD poll_fds[2];
int poll_ret;
do
{
- poll_fds[0].events = POLLIN;
+ poll_fds[0].events = G_IO_IN;
poll_fds[0].fd = dbus_fd;
- poll_fds[1].events = POLLIN;
+ poll_fds[1].events = G_IO_IN;
poll_fds[1].fd = cancel_fd;
- poll_ret = poll (poll_fds, sent_cancel?1:2, -1);
+ poll_ret = g_poll (poll_fds, sent_cancel?1:2, -1);
}
while (poll_ret == -1 && errno == EINTR);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]