diff options
author | Xiang Xiao <xiaoxiang@xiaomi.com> | 2021-05-05 09:12:39 -0700 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2021-05-27 13:45:47 +0200 |
commit | 07245c1cdd18df90be85a1f163972ec18956a7cd (patch) | |
tree | d68a14152d56cd487e03ce3d6e5fa95cc80b15b2 /src | |
parent | 094aeeafbe8f3154d3721ddbd71477c57f4c487b (diff) | |
download | libssh-07245c1cdd18df90be85a1f163972ec18956a7cd.tar.gz libssh-07245c1cdd18df90be85a1f163972ec18956a7cd.tar.xz libssh-07245c1cdd18df90be85a1f163972ec18956a7cd.zip |
Fix error: dereferencing pointer to incomplete type ‘struct timeval’
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Change-Id: I99d2016595966d805c9e27b5c2f2a0a5b4ad8611
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.c | 3 | ||||
-rw-r--r-- | src/connect.c | 3 | ||||
-rw-r--r-- | src/sftp.c | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/src/channels.c b/src/channels.c index 11a9413a..b3a0d494 100644 --- a/src/channels.c +++ b/src/channels.c @@ -29,6 +29,9 @@ #include <errno.h> #include <time.h> #include <stdbool.h> +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif /* HAVE_SYS_TIME_H */ #ifndef _WIN32 #include <netinet/in.h> diff --git a/src/connect.c b/src/connect.c index 252e2c63..ce4d58df 100644 --- a/src/connect.c +++ b/src/connect.c @@ -29,6 +29,9 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif /* HAVE_SYS_TIME_H */ #include "libssh/libssh.h" #include "libssh/misc.h" @@ -32,6 +32,9 @@ #include <fcntl.h> #include <stdio.h> #include <stdint.h> +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif /* HAVE_SYS_TIME_H */ #include <sys/types.h> #include <sys/stat.h> #include <limits.h> |