aboutsummaryrefslogtreecommitdiff
path: root/paste.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 /paste.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 'paste.c')
-rw-r--r--paste.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/paste.c b/paste.c
index 3882a260..29f17b37 100644
--- a/paste.c
+++ b/paste.c
@@ -1,4 +1,4 @@
-/* $Id: paste.c,v 1.3 2008-06-20 18:45:35 nicm Exp $ */
+/* $Id: paste.c,v 1.4 2008-08-28 17:45:26 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -17,9 +17,9 @@
*/
#include <sys/types.h>
+#include <sys/time.h>
#include <string.h>
-#include <time.h>
#include "tmux.h"
@@ -108,8 +108,8 @@ paste_add(struct paste_stack *ps, const char *data, u_int limit)
ARRAY_INSERT(ps, 0, pb);
pb->data = xstrdup(data);
- if (clock_gettime(CLOCK_REALTIME, &pb->ts) != 0)
- fatal("clock_gettime");
+ if (gettimeofday(&pb->tv, NULL) != 0)
+ fatal("gettimeofday");
}
int
@@ -124,8 +124,8 @@ paste_replace(struct paste_stack *ps, u_int idx, const char *data)
xfree(pb->data);
pb->data = xstrdup(data);
- if (clock_gettime(CLOCK_REALTIME, &pb->ts) != 0)
- fatal("clock_gettime");
+ if (gettimeofday(&pb->tv, NULL) != 0)
+ fatal("gettimeofday");
return (0);
}