fix-windows.patch 890 B

123456789101112131415161718192021222324252627
  1. diff --git a/core/shared/platform/windows/win_clock.c b/core/shared/platform/windows/win_clock.c
  2. index ec0bc85..53f9bdb 100644
  3. --- a/core/shared/platform/windows/win_clock.c
  4. +++ b/core/shared/platform/windows/win_clock.c
  5. @@ -10,9 +10,19 @@
  6. #define NANOSECONDS_PER_SECOND 1000000000ULL
  7. #define NANOSECONDS_PER_TICK 100
  8. -extern NTSTATUS
  9. -NtQueryTimerResolution(PULONG MinimumResolution, PULONG MaximumResolution,
  10. - PULONG CurrentResolution);
  11. +#ifndef __kernel_entry
  12. +#define __kernel_entry
  13. +#endif
  14. +#ifndef NTAPI
  15. +#define NTAPI
  16. +#endif
  17. +#ifndef _Out_
  18. +#define _Out_
  19. +#endif
  20. +extern __kernel_entry NTSTATUS NTAPI
  21. +NtQueryTimerResolution(_Out_ PULONG MinimumResolution,
  22. + _Out_ PULONG MaximumResolution,
  23. + _Out_ PULONG CurrentResolution);
  24. static __wasi_errno_t
  25. calculate_monotonic_clock_frequency(uint64 *out_frequency)