mfontanini / libtins

High-level, multiplatform C++ network packet sniffing and crafting library.
http://libtins.github.io/
BSD 2-Clause "Simplified" License
1.91k stars 377 forks source link

Fix conflict between variable and macro name #458

Closed demiquartz closed 2 years ago

demiquartz commented 2 years ago

Fix conflict between variable and macro name when building on Msys2 / MinGW64.

The errors that occurred are:

libtins/src/ipv6.cpp:377:35: error: expected primary-expression before 'struct'
  377 |         link_addr.sin6_scope_id = interface.id();
      |                                   ^~~~~~~~~
ninja: build stopped: subcommand failed.

This change defines WIN32_LEAN_AND_MEAN and prevents interface macros from being defined.

mfontanini commented 2 years ago

Thanks and sorry for the delay!