nonblocking examples: fix warning about unused tvdiff on Mac OS X
Этот коммит содержится в:
родитель
31a5986c6d
Коммит
6f95c2efd3
@ -38,12 +38,14 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_GETTIMEOFDAY
|
||||||
/* diff in ms */
|
/* diff in ms */
|
||||||
static long tvdiff(struct timeval newer, struct timeval older)
|
static long tvdiff(struct timeval newer, struct timeval older)
|
||||||
{
|
{
|
||||||
return (newer.tv_sec-older.tv_sec)*1000+
|
return (newer.tv_sec-older.tv_sec)*1000+
|
||||||
(newer.tv_usec-older.tv_usec)/1000;
|
(newer.tv_usec-older.tv_usec)/1000;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int waitsocket(int socket_fd, LIBSSH2_SESSION *session)
|
static int waitsocket(int socket_fd, LIBSSH2_SESSION *session)
|
||||||
{
|
{
|
||||||
|
@ -39,12 +39,14 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_GETTIMEOFDAY
|
||||||
/* diff in ms */
|
/* diff in ms */
|
||||||
static long tvdiff(struct timeval newer, struct timeval older)
|
static long tvdiff(struct timeval newer, struct timeval older)
|
||||||
{
|
{
|
||||||
return (newer.tv_sec-older.tv_sec)*1000+
|
return (newer.tv_sec-older.tv_sec)*1000+
|
||||||
(newer.tv_usec-older.tv_usec)/1000;
|
(newer.tv_usec-older.tv_usec)/1000;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int waitsocket(int socket_fd, LIBSSH2_SESSION *session)
|
static int waitsocket(int socket_fd, LIBSSH2_SESSION *session)
|
||||||
{
|
{
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user