diff --git a/mongoose.h b/mongoose.h index 54898898..3a0bf555 100644 --- a/mongoose.h +++ b/mongoose.h @@ -168,17 +168,16 @@ static __inline struct tm *localtime_r(const time_t *t, struct tm *tm) { #include #include #include -#include #include +#include #if defined(__GNUC__) #include #include #else -typedef long suseconds_t; struct timeval { time_t tv_sec; - suseconds_t tv_usec; + long tv_usec; }; #endif @@ -278,10 +277,9 @@ static inline void *mg_calloc(int cnt, size_t size) { #if !defined(__GNUC__) // copied from GCC on ARM; for some reason useconds are signed -typedef long suseconds_t; struct timeval { time_t tv_sec; - suseconds_t tv_usec; + long tv_usec; }; #endif @@ -395,7 +393,6 @@ typedef enum { false = 0, true = 1 } bool; #endif #endif -typedef unsigned suseconds_t; typedef int socklen_t; #define MG_DIRSEP '\\' #ifndef PATH_MAX diff --git a/src/arch_freertos_lwip.h b/src/arch_freertos_lwip.h index de19d9fb..4726ce74 100644 --- a/src/arch_freertos_lwip.h +++ b/src/arch_freertos_lwip.h @@ -5,17 +5,16 @@ #include #include #include -#include #include +#include #if defined(__GNUC__) #include #include #else -typedef long suseconds_t; struct timeval { time_t tv_sec; - suseconds_t tv_usec; + long tv_usec; }; #endif diff --git a/src/arch_freertos_tcp.h b/src/arch_freertos_tcp.h index db2c9147..fe0dd4e4 100644 --- a/src/arch_freertos_tcp.h +++ b/src/arch_freertos_tcp.h @@ -61,10 +61,9 @@ static inline void *mg_calloc(int cnt, size_t size) { #if !defined(__GNUC__) // copied from GCC on ARM; for some reason useconds are signed -typedef long suseconds_t; struct timeval { time_t tv_sec; - suseconds_t tv_usec; + long tv_usec; }; #endif diff --git a/src/arch_win32.h b/src/arch_win32.h index bb1b3e21..759a140f 100644 --- a/src/arch_win32.h +++ b/src/arch_win32.h @@ -56,7 +56,6 @@ typedef enum { false = 0, true = 1 } bool; #endif #endif -typedef unsigned suseconds_t; typedef int socklen_t; #define MG_DIRSEP '\\' #ifndef PATH_MAX