Skip to content
This repository was archived by the owner on Jan 28, 2023. It is now read-only.

Commit 3e21ff4

Browse files
committed
Fixed tests and include paths in Windows sources
Signed-off-by: Alexandro Sanchez Bach <[email protected]>
1 parent 89857de commit 3e21ff4

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

core/include/emulate.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@
3131
#ifndef HAX_CORE_EMULATE_H_
3232
#define HAX_CORE_EMULATE_H_
3333

34-
#ifdef HAX_TESTS
35-
#include <stdint.h>
36-
#else
3734
#include "../../include/hax_types.h"
38-
#endif
3935

4036
#include "emulate_ops.h"
4137

include/hax_types.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
#endif
6363

6464
/* Detect platform */
65+
#ifndef HAX_TESTS // Prevent kernel-only exports from reaching userland code
6566
// MacOS
6667
#if defined(__MACH__)
6768
#define HAX_PLATFORM_DARWIN
@@ -73,6 +74,9 @@
7374
#else
7475
#error "Unsupported platform"
7576
#endif
77+
#else // !HAX_TESTS
78+
#include <stdint.h>
79+
#endif // HAX_TESTS
7680

7781
#define HAX_PAGE_SIZE 4096
7882
#define HAX_PAGE_SHIFT 12

platforms/windows/hax_host_mem.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
* POSSIBILITY OF SUCH DAMAGE.
2929
*/
3030

31-
#include "../include/hax_host_mem.h"
32-
#include "../include/hax.h"
33-
#include "../core/include/paging.h"
31+
#include "../../include/hax_host_mem.h"
32+
#include "../../include/hax.h"
33+
#include "../../core/include/paging.h"
3434

3535
int hax_pin_user_pages(uint64_t start_uva, uint64_t size, hax_memdesc_user *memdesc)
3636
{

platforms/windows/hax_win.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include <Ntifs.h>
3636
#include <stdarg.h>
3737
#include "hax_core_interface.h"
38-
#include "..\hax_interface.h"
38+
#include "../../include/hax_interface.h"
3939
#include "hax_types_windows.h"
4040
#include "hax_entry.h"
4141
#include "hax_event_win.h"

platforms/windows/hax_wrapper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*/
3030

3131
#include "hax_win.h"
32-
#include "../core/include/ia32.h"
32+
#include "../../core/include/ia32.h"
3333

3434
int default_hax_log_level = 3;
3535
int max_cpus;

0 commit comments

Comments
 (0)