mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-19 05:10:40 +00:00
fix some compile problems with mingw
This commit is contained in:
parent
a55679224f
commit
215dec653b
@ -41,7 +41,7 @@ sntp_set_system_time(u32_t sec)
|
|||||||
struct tm current_time_val;
|
struct tm current_time_val;
|
||||||
time_t current_time = (time_t)sec;
|
time_t current_time = (time_t)sec;
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#if defined(_WIN32) || defined(WIN32)
|
||||||
localtime_s(¤t_time_val, ¤t_time);
|
localtime_s(¤t_time_val, ¤t_time);
|
||||||
#else
|
#else
|
||||||
localtime_r(¤t_time, ¤t_time_val);
|
localtime_r(¤t_time, ¤t_time_val);
|
||||||
|
@ -50,6 +50,11 @@
|
|||||||
#define LWIP_PROVIDE_ERRNO /* provide errno for non-MSVC */
|
#define LWIP_PROVIDE_ERRNO /* provide errno for non-MSVC */
|
||||||
#endif /* _MSC_VER */
|
#endif /* _MSC_VER */
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#define LWIP_TIMEVAL_PRIVATE 0
|
||||||
|
#include <sys/time.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define platform endianness (might already be defined) */
|
/* Define platform endianness (might already be defined) */
|
||||||
#ifndef BYTE_ORDER
|
#ifndef BYTE_ORDER
|
||||||
#define BYTE_ORDER LITTLE_ENDIAN
|
#define BYTE_ORDER LITTLE_ENDIAN
|
||||||
|
@ -102,7 +102,6 @@ pcapifh_alloc_readonly_copy(void *data, size_t len)
|
|||||||
lwip_win32_platform_diag("VirtualProtect failed: %d\n", GetLastError());
|
lwip_win32_platform_diag("VirtualProtect failed: %d\n", GetLastError());
|
||||||
while(1);
|
while(1);
|
||||||
}
|
}
|
||||||
printf("pcapifh_alloc_readonly_copy(%d): 0x%08x\n", len, ret);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user