[bug #58311] Win32: need to replace <ntddndis.h> include with <ndis.h> in pcapif_helper.c

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #58311] Win32: need to replace <ntddndis.h> include with <ndis.h> in pcapif_helper.c

Ashley Duncan
URL:
  <https://savannah.nongnu.org/bugs/?58311>

                 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
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: git head

    _______________________________________________________

Details:

Hello!

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:
"""Notes:
    If you are writing kernel mode code, you should #include <ndis.h> instead
    of including this header directly.
"""




    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?58311>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #58311] Win32: need to replace <ntddndis.h> include with <ndis.h> in pcapif_helper.c

Ashley Duncan
Follow-up Comment #1, bug #58311 (project lwip):

UPD: looks like <ntddndis.h> work's fine for MinGW compiler, but for MSVC
should be <ndis.h>

probably should be something like that:
#ifdef _MSC_VER
#include <ndis.h>
#else
#include <ntddndis.h>
#endif

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?58311>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #58311] Win32: need to replace <ntddndis.h> include with <ndis.h> in pcapif_helper.c

Ashley Duncan
Follow-up Comment #2, bug #58311 (project lwip):

UPD: don't know why, but now <ntddndis.h> also works fine for MSVC compiler.
And I can't build project with <ndis.h>. Probably there were some kind of
problems with paths to includes or I donno.

Could you please close this Task? Strange, but I can't do that myself.

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?58311>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #58311] Win32: need to replace <ntddndis.h> include with <ndis.h> in pcapif_helper.c

Ashley Duncan
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>.

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?58311>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel