aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compat/fgetln.c5
-rw-r--r--tmux.h14
2 files changed, 18 insertions, 1 deletions
diff --git a/compat/fgetln.c b/compat/fgetln.c
index 639ce49c..7f7154f9 100644
--- a/compat/fgetln.c
+++ b/compat/fgetln.c
@@ -32,6 +32,11 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include <sys/types.h>
+
+#include <errno.h>
+#include <stdio.h>
+
#include "tmux.h"
char *
diff --git a/tmux.h b/tmux.h
index 47daf108..c175b15f 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1,4 +1,4 @@
-/* $Id: tmux.h,v 1.163 2008-06-22 21:52:41 nicm Exp $ */
+/* $Id: tmux.h,v 1.164 2008-06-22 22:20:07 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -75,6 +75,18 @@ extern const char *__progname;
((tsp)->tv_sec cmp (usp)->tv_sec))
#endif
+#ifndef timespecadd
+#define timespecadd(tsp, usp, vsp) \
+ do { \
+ (vsp)->tv_sec = (tsp)->tv_sec + (usp)->tv_sec; \
+ (vsp)->tv_nsec = (tsp)->tv_nsec + (usp)->tv_nsec; \
+ if ((vsp)->tv_nsec >= 1000000000L) { \
+ (vsp)->tv_sec++; \
+ (vsp)->tv_nsec -= 1000000000L; \
+ } \
+ } while (0)
+#endif
+
#ifndef TTY_NAME_MAX
#define TTY_NAME_MAX 32
#endif