diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-08-28 17:45:30 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-08-28 17:45:30 +0000 |
commit | 33aa9315414dca1218b3c88b0c5ffc89d4379974 (patch) | |
tree | 1594150f11001adb185809b5f593ed4be14f3dbe /buffer-poll.c | |
parent | 0abb4ca413d3df152a969d5141622771ddc1f9fa (diff) |
Support OS X by moving to gettimeofday(2) and adding poll compat from OpenSSH.
Diffstat (limited to 'buffer-poll.c')
-rw-r--r-- | buffer-poll.c | 5 |
1 files changed, 3 insertions, 2 deletions
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 <nicm@users.sourceforge.net> @@ -19,7 +19,6 @@ #include <sys/types.h> #include <errno.h> -#include <poll.h> #include <unistd.h> #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)); |