Skip to content

Commit 07f3e33

Browse files
authored
Deref pointer in minipal/time (#114598)
* Deref pointer in minipal/time * Update minipalconfig.h.in * Update configure.cmake
1 parent d874371 commit 07f3e33

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

src/native/minipal/configure.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ include(CheckFunctionExists)
22
include(CheckIncludeFiles)
33
include(CheckSymbolExists)
44

5-
check_include_files("windows.h" HAVE_WINDOWS_H)
65
check_include_files("windows.h;bcrypt.h" HAVE_BCRYPT_H)
76
check_include_files("sys/auxv.h;asm/hwcap.h" HAVE_AUXV_HWCAP_H)
87
check_include_files("asm/hwprobe.h" HAVE_HWPROBE_H)

src/native/minipal/minipalconfig.h.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#cmakedefine01 HAVE_CLOCK_GETTIME_NSEC_NP
1010
#cmakedefine01 BIGENDIAN
1111
#cmakedefine01 HAVE_BCRYPT_H
12-
#cmakedefine01 HAVE_WINDOWS_H
1312
#cmakedefine01 HAVE_FSYNC
1413

1514
#endif

src/native/minipal/time.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <minipal/time.h>
66
#include "minipalconfig.h"
77

8-
#if HAVE_WINDOWS_H
8+
#if HOST_WINDOWS
99

1010
#include <Windows.h>
1111

@@ -23,7 +23,7 @@ int64_t minipal_hires_tick_frequency()
2323
return ts.QuadPart;
2424
}
2525

26-
#else // HAVE_WINDOWS_H
26+
#else // HOST_WINDOWS
2727

2828
#include "minipalconfig.h"
2929

@@ -77,17 +77,17 @@ int64_t minipal_hires_ticks(void)
7777
#endif
7878
}
7979

80-
#endif // !HAVE_WINDOWS_H
80+
#endif // HOST_WINDOWS
8181

8282
void minipal_microdelay(uint32_t usecs, uint32_t* usecsSinceYield)
8383
{
84-
#if HAVE_WINDOWS_H
84+
#if HOST_WINDOWS
8585
if (usecs > 1000)
8686
{
8787
SleepEx(usecs / 1000, FALSE);
8888
if (usecsSinceYield)
8989
{
90-
usecsSinceYield = 0;
90+
*usecsSinceYield = 0;
9191
}
9292

9393
return;
@@ -107,7 +107,7 @@ void minipal_microdelay(uint32_t usecs, uint32_t* usecsSinceYield)
107107

108108
if (usecsSinceYield)
109109
{
110-
usecsSinceYield = 0;
110+
*usecsSinceYield = 0;
111111
}
112112

113113
return;

0 commit comments

Comments
 (0)