# HG changeset patch # User Matt Johnston # Date 1159771172 0 # Node ID 09cb54106e89d65b76b330876fb1f15be7b60241 # Parent 03f65e461915a940939e4cc689fc89721ffc40de# Parent 64abb124763d032416df97439f7d88d6d047a290 explicit merge of '0501e6f661b5415eb76f3b312d183c3adfbfb712' and '2b954d406290e6a2be8eb4a262d3675ac95ac544' diff -r 64abb124763d -r 09cb54106e89 CHANGES --- 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 diff -r 64abb124763d -r 09cb54106e89 scpmisc.h --- 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 +