buglwIP - A Lightweight TCP/IP stack - Bugs: bug #58311, Win32: need to replace...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitted by:  Andrey Vinogradov <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 Planned Release:  None
lwIP version:  git head

Tue 02 Jun 2020 03:26:11 PM UTC, comment #3: 

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

Andrey Vinogradov <andreyvinogradov>
Mon 01 Jun 2020 05:13:22 PM UTC, comment #2: 

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.

Andrey Vinogradov <andreyvinogradov>
Wed 06 May 2020 06:39:21 PM UTC, comment #1: 

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

Andrey Vinogradov <andreyvinogradov>
Wed 06 May 2020 02:27:31 PM UTC, original submission:  

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.
"""

Andrey Vinogradov <andreyvinogradov>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by andreyvinogradov (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.6