aboutsummaryrefslogtreecommitdiff
path: root/cmd.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 /cmd.c
parent0abb4ca413d3df152a969d5141622771ddc1f9fa (diff)
downloadrtmux-33aa9315414dca1218b3c88b0c5ffc89d4379974.tar.gz
rtmux-33aa9315414dca1218b3c88b0c5ffc89d4379974.tar.bz2
rtmux-33aa9315414dca1218b3c88b0c5ffc89d4379974.zip
Support OS X by moving to gettimeofday(2) and adding poll compat from OpenSSH.
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd.c b/cmd.c
index 481b3078..0b378e14 100644
--- a/cmd.c
+++ b/cmd.c
@@ -1,4 +1,4 @@
-/* $Id: cmd.c,v 1.62 2008-07-19 10:07:50 nicm Exp $ */
+/* $Id: cmd.c,v 1.63 2008-08-28 17:45:25 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -304,7 +304,7 @@ struct session *
cmd_current_session(struct cmd_ctx *ctx)
{
struct msg_command_data *data = ctx->msgdata;
- struct timespec *ts;
+ struct timeval *tv;
struct session *s, *newest = NULL;
u_int i;
@@ -327,12 +327,12 @@ cmd_current_session(struct cmd_ctx *ctx)
return (s);
}
- ts = NULL;
+ tv = NULL;
for (i = 0; i < ARRAY_LENGTH(&sessions); i++) {
s = ARRAY_ITEM(&sessions, i);
- if (s != NULL && (ts == NULL || timespeccmp(&s->ts, ts, >))) {
+ if (s != NULL && (tv == NULL || timercmp(&s->tv, tv, >))) {
newest = ARRAY_ITEM(&sessions, i);
- ts = &s->ts;
+ tv = &s->tv;
}
}
return (newest);