changeset 360:09cb54106e89 insecure-nocrypto

explicit merge of '0501e6f661b5415eb76f3b312d183c3adfbfb712' and '2b954d406290e6a2be8eb4a262d3675ac95ac544'
author Matt Johnston <matt@ucc.asn.au>
date Mon, 02 Oct 2006 06:39:32 +0000
parents 03f65e461915 (diff) 64abb124763d (current diff)
children 461c4b1fb35f
files
diffstat 2 files changed, 25 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES	Fri Mar 10 06:30:52 2006 +0000
+++ b/CHANGES	Mon Oct 02 06:39:32 2006 +0000
@@ -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
--- a/scpmisc.h	Fri Mar 10 06:30:52 2006 +0000
+++ b/scpmisc.h	Mon Oct 02 06:39:32 2006 +0000
@@ -46,3 +46,24 @@
 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
+