Summary: Win32: need to replace <ntddndis.h> include with
<ndis.h> in pcapif_helper.c
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: andreyvinogradov
Submitted on: Wed 06 May 2020 02:27:31 PM UTC
Category: Platform ports
Severity: 3 - Normal
Item Group: Compiler Warning
Assigned to: None
Discussion Lock: Any
Planned Release: None
lwIP version: git head
In master branch (lwip and lwip_contrib repos) I noticed that I can compile
pcapif_helper.c file with msvc compiler, but I can't compile it with new
MinGW. Precompiler can't find NDIS_MEDIA_STATE definition. It's in <ndis.h>.
Also I see in my <ntddndis.h> header this line:
If you are writing kernel mode code, you should #include <ndis.h> instead
of including this header directly.
[bug #58311] Win32: need to replace <ntddndis.h> include with <ndis.h> in pcapif_helper.c
Follow-up Comment #3, bug #58311 (project lwip):
UPD: hmm, looks like using <ndis.h> or <ntddndis.h> is somehow depend on
compiler target architecture. Right now I can't build pcapif_helper.c with
MinGW32 version and had to change include to <ndis.h>. But it does compile
with MinGW64 with <ntddndis.h>.