summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2006-10-02 06:39:32 +0000
committerMatt Johnston <matt@ucc.asn.au>2006-10-02 06:39:32 +0000
commit6fa254325e49f73689f30c35c025087101e99f2a (patch)
tree40e8a4fbedf6e12df108bade305bb5b5a918f405
parentf51d956b6ef2e4b9fe21cb2457fd324030d96945 (diff)
parent9ca5291d86458f30a2896ef004c982134fa13a89 (diff)
downloaddropbear-6fa254325e49f73689f30c35c025087101e99f2a.tar.gz
explicit merge of '0501e6f661b5415eb76f3b312d183c3adfbfb712'
and '2b954d406290e6a2be8eb4a262d3675ac95ac544'
-rw-r--r--CHANGES4
-rw-r--r--scpmisc.h21
2 files changed, 25 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 4855f16..5e07ffd 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+0.48.1 - Sat 11 March 2006
+
+- Compile fix for scp
+
0.48 - Thurs 9 March 2006
- Check that the circular buffer is properly empty before
diff --git a/scpmisc.h b/scpmisc.h
index c829347..7d0b326 100644
--- a/scpmisc.h
+++ b/scpmisc.h
@@ -46,3 +46,24 @@ char *xstrdup(const char *);
char *ssh_get_progname(char *);
void fatal(char* fmt,...);
void sanitise_stdfd(void);
+
+/* Required for non-BSD platforms, from OpenSSH's defines.h */
+#ifndef timersub
+#define timersub(a, b, result) \
+ do { \
+ (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
+ (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
+ if ((result)->tv_usec < 0) { \
+ --(result)->tv_sec; \
+ (result)->tv_usec += 1000000; \
+ } \
+ } while (0)
+#endif
+
+#ifndef TIMEVAL_TO_TIMESPEC
+#define TIMEVAL_TO_TIMESPEC(tv, ts) { \
+ (ts)->tv_sec = (tv)->tv_sec; \
+ (ts)->tv_nsec = (tv)->tv_usec * 1000; \
+}
+#endif
+