1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-07-29 13:01:14 +03:00

example: restore sys/time.h for AIX

In AIX, `time.h` header file doesn't have definitions like
`fd_set`, `struct timeval`, which are found in `sys/time.h`.

Add `sys/time.h` to files affected when available.

Regression from e53aae0e16 #1001.

Reported-by: shubhamhii on GitHub
Assisted-by: shubhamhii on GitHub
Fixes #1334
Fixes #1335
Closes #1340
This commit is contained in:
Viktor Szakats
2024-03-29 07:48:44 +00:00
parent a6a9093b39
commit 24503cb9e1
4 changed files with 12 additions and 0 deletions

View File

@ -20,6 +20,9 @@
#ifdef HAVE_ARPA_INET_H #ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h> #include <arpa/inet.h>
#endif #endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <time.h> /* for time() */ #include <time.h> /* for time() */

View File

@ -27,6 +27,9 @@
#ifdef HAVE_NETINET_IN_H #ifdef HAVE_NETINET_IN_H
#include <netinet/in.h> #include <netinet/in.h>
#endif #endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include <stdio.h> #include <stdio.h>

View File

@ -26,6 +26,9 @@
#ifdef HAVE_ARPA_INET_H #ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h> #include <arpa/inet.h>
#endif #endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <time.h> /* for time() */ #include <time.h> /* for time() */

View File

@ -26,6 +26,9 @@
#ifdef HAVE_ARPA_INET_H #ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h> #include <arpa/inet.h>
#endif #endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <time.h> /* for time() */ #include <time.h> /* for time() */