Enable Windows MinGW support (#1000)
Allow compilation on Windows MinGW, see build_wamr.md for more details. Note that WASI and some other smallish details are still not supported, but we have a starting point. See more discussion at #993
This commit is contained in:
@ -9,7 +9,12 @@ uint64
|
||||
os_time_get_boot_microsecond()
|
||||
{
|
||||
struct timespec ts;
|
||||
#if defined(__MINGW32__)
|
||||
// https://www.mail-archive.com/mingw-w64-public@lists.sourceforge.net/msg18361.html
|
||||
clock_gettime(CLOCK_REALTIME, &ts);
|
||||
#else
|
||||
timespec_get(&ts, TIME_UTC);
|
||||
#endif
|
||||
|
||||
return ((uint64)ts.tv_sec) * 1000 * 1000 + ((uint64)ts.tv_nsec) / 1000;
|
||||
}
|
||||
|
||||
@ -9,6 +9,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN32_)
|
||||
|
||||
#if defined(__MINGW32__) && !defined(_SH_DENYNO)
|
||||
#define _SH_DENYNO 0x40
|
||||
#endif
|
||||
|
||||
char *
|
||||
bh_read_file_to_buffer(const char *filename, uint32 *ret_size)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user