add NO_OLD_TIMEVAL_NAME macro for backwards compatibility

This commit is contained in:
Jacob Barthelmeh
2020-02-07 11:56:30 -07:00
parent a9e9120fa0
commit 3c077a3cef
2 changed files with 8 additions and 2 deletions

View File

@@ -81,7 +81,11 @@ int catastrophic = 0; /* Use with -x flag to still exit when an error is
static int lng_index = 0; static int lng_index = 0;
#ifdef WOLFSSL_CALLBACKS #ifdef WOLFSSL_CALLBACKS
#if !defined(NO_OLD_TIMEVAL_NAME)
Timeval srvTo;
#else
WOLFSSL_TIMEVAL srvTo; WOLFSSL_TIMEVAL srvTo;
#endif
static int srvHandShakeCB(HandShakeInfo* info) static int srvHandShakeCB(HandShakeInfo* info)
{ {
(void)info; (void)info;

View File

@@ -61,7 +61,9 @@ typedef struct handShakeInfo_st {
long tv_usec; /* Microseconds. */ long tv_usec; /* Microseconds. */
} WOLFSSL_TIMEVAL; } WOLFSSL_TIMEVAL;
#endif /* HAVE_SYS_TIME_H */ #endif /* HAVE_SYS_TIME_H */
#if !defined(NO_OLD_TIMEVAL_NAME)
#define Timeval WOLFSSL_TIMEVAL
#endif
typedef struct packetInfo_st { typedef struct packetInfo_st {
char packetName[MAX_PACKETNAME_SZ + 1]; /* SSL packet name */ char packetName[MAX_PACKETNAME_SZ + 1]; /* SSL packet name */