cURL-build-win32/patch/ssh2_session.diff

23 lines
846 B
Diff
Raw Normal View History

2021-06-13 21:58:25 +02:00
diff --git "a/D:\\_Sandbox\\curl\\libssh2-x64\\src\\session.c.orig" "b/D:\\_Sandbox\\curl\\libssh2-x64\\src\\session.c"
index e439acd..476a497 100644
--- "a/src/session.c"
+++ "b/src/session.c"
@@ -58,6 +58,8 @@
#include "mac.h"
#include "misc.h"
2021-06-13 22:11:08 +02:00
+#define DIFFTIME(_b,_a) ((double)((_b) - (_a)))
2021-06-13 21:58:25 +02:00
+
/* libssh2_default_alloc
*/
static
@@ -610,7 +612,7 @@ int _libssh2_wait_socket(LIBSSH2_SESSION *session, time_t start_time)
(seconds_to_next == 0 ||
ms_to_next > session->api_timeout)) {
time_t now = time(NULL);
- elapsed_ms = (long)(1000*difftime(now, start_time));
+ elapsed_ms = (long)(1000*DIFFTIME(now, start_time));
if(elapsed_ms > session->api_timeout) {
return _libssh2_error(session, LIBSSH2_ERROR_TIMEOUT,
"API timeout expired");