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

Submitter:  Andrey Vinogradov <andreyvinogradov>
Submitted:  Wed 06 May 2020 02:27:31 PM UTC
   
 
Category:  Platform ports Severity:  3 - Normal
Item Group:  Compiler Warning Status:  Works For Me
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  git head

Mon 04 Apr 2022 07:35:52 PM UTC, comment #4: 

We're not writing kernel mode code...

Simon Goldschmidt <goldsimon>
Group administrator
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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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 goldsimon (Posted a comment)
  • -email is unavailable- added by andreyvinogradov (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-04-04 goldsimon StatusNone Works For Me
        Assigned toNone goldsimon
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code