Skip to content

Commit

Permalink
nonblocking examples: fix warning about unused tvdiff on Mac OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
mback2k committed Mar 24, 2015
1 parent 31a5986 commit 6f95c2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions example/scp_nonblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 2 additions & 0 deletions example/sftp_nonblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 6f95c2e

Please sign in to comment.