diff --git a/reactos/drivers/net/npf/Makefile b/reactos/drivers/net/npf/Makefile index 002defa959f..075056c5f2c 100644 --- a/reactos/drivers/net/npf/Makefile +++ b/reactos/drivers/net/npf/Makefile @@ -7,9 +7,9 @@ TARGET_TYPE = driver TARGET_NAME = npf -#TARGET_CFLAGS = -DDBG -DWIN_NT_DRIVER -DKQPC_TS -I$(PATH_TO_TOP)/ntoskrnl/include +#TARGET_CFLAGS = -D__USE_W32API -D_TIMEVAL_DEFINED -DDBG -DWIN_NT_DRIVER -DKQPC_TS -I$(PATH_TO_TOP)/ntoskrnl/include -TARGET_CFLAGS = -DDBG -DWIN_NT_DRIVER -DKQPC_TS -DUSE_KLOCKS -I$(PATH_TO_TOP)/ntoskrnl/include -Wall -Werror +TARGET_CFLAGS = -D__USE_W32API -D_TIMEVAL_DEFINED -DDBG -DWIN_NT_DRIVER -DKQPC_TS -DUSE_KLOCKS -I$(PATH_TO_TOP)/ntoskrnl/include -Wall -Werror TARGET_DDKLIBS = ndis.a diff --git a/reactos/drivers/net/npf/dump.c b/reactos/drivers/net/npf/dump.c index aec750c813d..a22cc3345d7 100644 --- a/reactos/drivers/net/npf/dump.c +++ b/reactos/drivers/net/npf/dump.c @@ -26,7 +26,7 @@ #include "ndis.h" #else #include -#include +#include //#define PsGetCurrentProcess() IoGetCurrentProcess() #ifndef PsGetCurrentThread #define PsGetCurrentThread() ((PETHREAD) (KeGetCurrentThread())) diff --git a/reactos/drivers/net/npf/jitter.c b/reactos/drivers/net/npf/jitter.c index 950188dd0f0..43d2f0718b7 100644 --- a/reactos/drivers/net/npf/jitter.c +++ b/reactos/drivers/net/npf/jitter.c @@ -26,7 +26,7 @@ #include "ndis.h" #else #include -#include +#include #endif #include "packet.h" diff --git a/reactos/drivers/net/npf/openclos.c b/reactos/drivers/net/npf/openclos.c index be1e1ca02bb..5d133f3cf98 100644 --- a/reactos/drivers/net/npf/openclos.c +++ b/reactos/drivers/net/npf/openclos.c @@ -25,7 +25,7 @@ #include "ndis.h" #else #include -#include +#include #endif #include "debug.h" #include "packet.h" diff --git a/reactos/drivers/net/npf/packet.c b/reactos/drivers/net/npf/packet.c index 21fe029a9a3..60c67bac41b 100644 --- a/reactos/drivers/net/npf/packet.c +++ b/reactos/drivers/net/npf/packet.c @@ -26,7 +26,7 @@ #include "ndis.h" #else #include -#include +#include #endif #include "ntddpack.h" @@ -114,27 +114,14 @@ DriverEntry( ProtocolChar.MajorNdisVersion = 3; #endif ProtocolChar.MinorNdisVersion = 0; -#ifndef __GNUC__ ProtocolChar.Reserved = 0; -#else - ProtocolChar.u1.Reserved = 0; -#endif ProtocolChar.OpenAdapterCompleteHandler = NPF_OpenAdapterComplete; ProtocolChar.CloseAdapterCompleteHandler = NPF_CloseAdapterComplete; -#ifndef __GNUC__ ProtocolChar.SendCompleteHandler = NPF_SendComplete; ProtocolChar.TransferDataCompleteHandler = NPF_TransferDataComplete; -#else - ProtocolChar.u2.SendCompleteHandler = NPF_SendComplete; - ProtocolChar.u3.TransferDataCompleteHandler = NPF_TransferDataComplete; -#endif ProtocolChar.ResetCompleteHandler = NPF_ResetComplete; ProtocolChar.RequestCompleteHandler = NPF_RequestComplete; -#ifndef __GNUC__ ProtocolChar.ReceiveHandler = NPF_tap; -#else - ProtocolChar.u4.ReceiveHandler = NPF_tap; -#endif ProtocolChar.ReceiveCompleteHandler = NPF_ReceiveComplete; ProtocolChar.StatusHandler = NPF_Status; ProtocolChar.StatusCompleteHandler = NPF_StatusComplete; diff --git a/reactos/drivers/net/npf/packet.h b/reactos/drivers/net/npf/packet.h index 3fd4e0dcba9..d68e13b5064 100644 --- a/reactos/drivers/net/npf/packet.h +++ b/reactos/drivers/net/npf/packet.h @@ -32,13 +32,9 @@ #define NTKERNEL ///< Forces the compilation of the jitter with kernel calls -#ifdef __GNUC__ +struct bpf_insn; #undef EXIT_SUCCESS #undef EXIT_FAILURE -#define UNICODE_NULL ((WCHAR)0) // winnt -#include "win_bpf.h" -#include -#endif #include "jitter.h" #include "tme.h" diff --git a/reactos/drivers/net/npf/read.c b/reactos/drivers/net/npf/read.c index a97dd7bbbb9..6e2faa27d08 100644 --- a/reactos/drivers/net/npf/read.c +++ b/reactos/drivers/net/npf/read.c @@ -26,10 +26,8 @@ #include #else #include -#include +#include -#define NdisMoveMappedMemory(Destination,Source,Length) RtlCopyMemory(Destination,Source,Length) -#define NdisZeroMappedMemory(Destination,Length) RtlZeroMemory(Destination,Length) #define NdisReinitializePacket(Packet) \ { \ (Packet)->Private.Head = (PNDIS_BUFFER)NULL; \ diff --git a/reactos/drivers/net/npf/win_bpf.h b/reactos/drivers/net/npf/win_bpf.h index a28fa946ac5..f620ad809e7 100644 --- a/reactos/drivers/net/npf/win_bpf.h +++ b/reactos/drivers/net/npf/win_bpf.h @@ -47,7 +47,7 @@ typedef UCHAR u_char; typedef USHORT u_short; -typedef ULONG u_int; +typedef UINT u_int; typedef LONG bpf_int32; typedef ULONG bpf_u_int32; typedef ULONG u_int32; diff --git a/reactos/drivers/net/npf/write.c b/reactos/drivers/net/npf/write.c index 696623c1b03..8fea4800e55 100644 --- a/reactos/drivers/net/npf/write.c +++ b/reactos/drivers/net/npf/write.c @@ -26,7 +26,7 @@ #include "ndis.h" #else #include -#include +#include #define NdisReinitializePacket(Packet) \ { \ (Packet)->Private.Head = (PNDIS_BUFFER)NULL; \