vendor/libgit2/src/util/posix.h in rugged-1.6.5 vs vendor/libgit2/src/util/posix.h in rugged-1.7.1
- old
+ new
@@ -193,6 +193,28 @@
# define p_getaddrinfo(a, b, c, d) getaddrinfo(a, b, c, d)
# define p_freeaddrinfo(a) freeaddrinfo(a)
# define p_gai_strerror(c) gai_strerror(c)
#endif /* NO_ADDRINFO */
+#ifdef GIT_IO_POLL
+# include <poll.h>
+# define p_poll poll
+#elif GIT_IO_WSAPOLL
+# include <winsock2.h>
+# define p_poll WSAPoll
+#else
+# define POLLIN 0x01
+# define POLLPRI 0x02
+# define POLLOUT 0x04
+# define POLLERR 0x08
+# define POLLHUP 0x10
+
+struct pollfd {
+ int fd;
+ short events;
+ short revents;
+};
+
+extern int p_poll(struct pollfd *fds, unsigned int nfds, int timeout);
+#endif
+
#endif