From 33aa9315414dca1218b3c88b0c5ffc89d4379974 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 28 Aug 2008 17:45:30 +0000 Subject: Support OS X by moving to gettimeofday(2) and adding poll compat from OpenSSH. --- buffer-poll.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'buffer-poll.c') diff --git a/buffer-poll.c b/buffer-poll.c index d05c22f9..e4a8ae73 100644 --- a/buffer-poll.c +++ b/buffer-poll.c @@ -1,4 +1,4 @@ -/* $Id: buffer-poll.c,v 1.8 2008-07-01 20:35:16 nicm Exp $ */ +/* $Id: buffer-poll.c,v 1.9 2008-08-28 17:45:25 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -19,7 +19,6 @@ #include #include -#include #include #include "tmux.h" @@ -45,8 +44,10 @@ buffer_poll(struct pollfd *pfd, struct buffer *in, struct buffer *out) (long) getpid(), pfd->fd, pfd->revents, BUFFER_USED(out), BUFFER_USED(in)); +#ifndef BROKEN_POLL if (pfd->revents & (POLLERR|POLLNVAL|POLLHUP)) return (-1); +#endif if (pfd->revents & POLLIN) { buffer_ensure(in, BUFSIZ); n = read(pfd->fd, BUFFER_IN(in), BUFFER_FREE(in)); -- cgit