https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6f67132686606d6025945…
commit 6f67132686606d6025945e5e2bfbffb712d1e6ed
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Thu Apr 9 20:37:01 2020 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Thu Apr 9 20:41:17 2020 +0200
[LIB:ARBITER] Addendum to 374f2b4d: Fix build.
- No need to use a PCH when compiling a 1-file library.
- Add the _NTSYSTEM_ definition.
- Since the arbiter.h file is to be included by the users of this
library, namely only kernel-mode NT components (incl. NTOS), there
is no need to include the standard kernel-mode headers in it.
Include these headers instead in the private implementation of the
library, arbiter.c.
---
sdk/lib/drivers/arbiter/CMakeLists.txt | 6 ++----
sdk/lib/drivers/arbiter/arbiter.c | 7 +++++--
sdk/lib/drivers/arbiter/arbiter.h | 5 -----
3 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/sdk/lib/drivers/arbiter/CMakeLists.txt
b/sdk/lib/drivers/arbiter/CMakeLists.txt
index 2bf4e36025f..a049c8c8b38 100644
--- a/sdk/lib/drivers/arbiter/CMakeLists.txt
+++ b/sdk/lib/drivers/arbiter/CMakeLists.txt
@@ -1,10 +1,8 @@
-include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/rtl)
+add_definitions(-D_NTSYSTEM_)
list(APPEND SOURCE
- arbiter.c
- arbiter.h)
+ arbiter.c)
add_library(arbiter ${SOURCE})
add_dependencies(arbiter bugcodes xdk)
-add_pch(arbiter arbiter.h SOURCE)
diff --git a/sdk/lib/drivers/arbiter/arbiter.c b/sdk/lib/drivers/arbiter/arbiter.c
index fc85159b69b..9d7d5561de4 100644
--- a/sdk/lib/drivers/arbiter/arbiter.c
+++ b/sdk/lib/drivers/arbiter/arbiter.c
@@ -8,11 +8,14 @@
/* INCLUDES *******************************************************************/
-#define NDEBUG
-#include <debug.h>
+#include <ntifs.h>
+#include <ndk/rtltypes.h>
#include "arbiter.h"
+#define NDEBUG
+#include <debug.h>
+
/* GLOBALS ********************************************************************/
/* DATA **********************************************************************/
diff --git a/sdk/lib/drivers/arbiter/arbiter.h b/sdk/lib/drivers/arbiter/arbiter.h
index c4a51623e52..6b8be2fb207 100644
--- a/sdk/lib/drivers/arbiter/arbiter.h
+++ b/sdk/lib/drivers/arbiter/arbiter.h
@@ -9,11 +9,6 @@
#ifndef _ARBITER_H
#define _ARBITER_H
-#ifndef _NTOSKRNL_
-#include <ntifs.h>
-#include <ndk/rtlfuncs.h>
-#endif
-
typedef struct _ARBITER_ORDERING
{
ULONGLONG Start;