--- dbus-1.9.16.linux/dbus/dbus-sysdeps.h 2015-05-14 15:48:53.000000000 +0200 +++ dbus-1.9.16/dbus/dbus-sysdeps.h 2015-07-03 15:48:14.466343117 +0200 @@ -341,6 +341,19 @@ #define _DBUS_POLLHUP 0x0040 /** Invalid request: fd not open */ #define _DBUS_POLLNVAL 0x1000 +#elif HAVE_POLL +/** There is data to read */ +#define _DBUS_POLLIN POLLIN +/** There is urgent data to read */ +#define _DBUS_POLLPRI POLLPRI +/** Writing now will not block */ +#define _DBUS_POLLOUT POLLOUT +/** Error condition */ +#define _DBUS_POLLERR POLLERR +/** Hung up */ +#define _DBUS_POLLHUP POLLHUP +/** Invalid request: fd not open */ +#define _DBUS_POLLNVAL POLLNVAL #else /** There is data to read */ #define _DBUS_POLLIN 0x0001 @@ -356,6 +369,21 @@ #define _DBUS_POLLNVAL 0x0020 #endif +/** + * A portable struct pollfd wrapper. + */ +#if HAVE_POLL +typedef struct pollfd DBusPollFD; +#else +typedef struct +{ + DBusPollable fd; /**< File descriptor */ + short events; /**< Events to poll for */ + short revents; /**< Events that occurred */ +} DBusPollFD; +#endif + + #ifdef DBUS_WIN /* On Windows, you can only poll sockets. We emulate Unix poll() using @@ -407,16 +435,6 @@ #endif /* !DBUS_WIN */ -/** - * A portable struct pollfd wrapper. - */ -typedef struct -{ - DBusPollable fd; /**< File descriptor */ - short events; /**< Events to poll for */ - short revents; /**< Events that occurred */ -} DBusPollFD; - DBUS_PRIVATE_EXPORT int _dbus_poll (DBusPollFD *fds, int n_fds,