nonblocking examples: fix warning about unused tvdiff on Mac OS X
This commit is contained in:
parent
31a5986c6d
commit
6f95c2efd3
@ -38,12 +38,14 @@
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef HAVE_GETTIMEOFDAY
|
||||
/* diff in ms */
|
||||
static long tvdiff(struct timeval newer, struct timeval older)
|
||||
{
|
||||
return (newer.tv_sec-older.tv_sec)*1000+
|
||||
(newer.tv_usec-older.tv_usec)/1000;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int waitsocket(int socket_fd, LIBSSH2_SESSION *session)
|
||||
{
|
||||
|
@ -39,12 +39,14 @@
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef HAVE_GETTIMEOFDAY
|
||||
/* diff in ms */
|
||||
static long tvdiff(struct timeval newer, struct timeval older)
|
||||
{
|
||||
return (newer.tv_sec-older.tv_sec)*1000+
|
||||
(newer.tv_usec-older.tv_usec)/1000;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int waitsocket(int socket_fd, LIBSSH2_SESSION *session)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user