[NTOS] Don't define _IN_KERNEL_ globally for the kernel, but just where it's needed: when including regstr.h.

This commit is contained in:
Hermès Bélusca-Maïto 2022-03-08 05:35:43 +01:00
parent 551d28e09f
commit b414e1e4d7
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 4 additions and 1 deletions

View file

@ -58,9 +58,13 @@
#include <ndk/rtlfuncs.h> #include <ndk/rtlfuncs.h>
#include <ndk/sefuncs.h> #include <ndk/sefuncs.h>
#include <ndk/vftypes.h> #include <ndk/vftypes.h>
#undef TEXT #undef TEXT
#define TEXT(s) L##s #define TEXT(s) L##s
#define _IN_KERNEL_
#include <regstr.h> #include <regstr.h>
#include <ntstrsafe.h> #include <ntstrsafe.h>
#include <ntpoapi.h> #include <ntpoapi.h>
#define ENABLE_INTSAFE_SIGNED_FUNCTIONS #define ENABLE_INTSAFE_SIGNED_FUNCTIONS

View file

@ -11,7 +11,6 @@ include_directories(
add_definitions( add_definitions(
-D_NTOSKRNL_ -D_NTOSKRNL_
-D_NTSYSTEM_ -D_NTSYSTEM_
-D_IN_KERNEL_
-DNTDDI_VERSION=0x05020400) -DNTDDI_VERSION=0x05020400)
if(NOT DEFINED NEWCC) if(NOT DEFINED NEWCC)