summaryrefslogtreecommitdiffstats
path: root/session.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2008-08-28 17:45:30 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2008-08-28 17:45:30 +0000
commit33aa9315414dca1218b3c88b0c5ffc89d4379974 (patch)
tree1594150f11001adb185809b5f593ed4be14f3dbe /session.c
parent0abb4ca413d3df152a969d5141622771ddc1f9fa (diff)
Support OS X by moving to gettimeofday(2) and adding poll compat from OpenSSH.
Diffstat (limited to 'session.c')
-rw-r--r--session.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/session.c b/session.c
index b16482e7..e39cd182 100644
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
-/* $Id: session.c,v 1.41 2008-06-30 19:11:33 nicm Exp $ */
+/* $Id: session.c,v 1.42 2008-08-28 17:45:27 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -17,10 +17,10 @@
*/
#include <sys/types.h>
+#include <sys/time.h>
#include <string.h>
#include <stdlib.h>
-#include <time.h>
#include <unistd.h>
#include "tmux.h"
@@ -115,8 +115,8 @@ session_create(const char *name, const char *cmd, u_int sx, u_int sy)
u_int i;
s = xmalloc(sizeof *s);
- if (clock_gettime(CLOCK_REALTIME, &s->ts) != 0)
- fatal("clock_gettime failed");
+ if (gettimeofday(&s->tv, NULL) != 0)
+ fatal("gettimeofday");
s->curw = s->lastw = NULL;
RB_INIT(&s->windows);
TAILQ_INIT(&s->alerts);