pupnp / pupnp

libupnp: Build UPnP-compliant control points, devices, and bridges on several operating systems.
https://pupnp.github.io/pupnp
BSD 3-Clause "New" or "Revised" License
349 stars 114 forks source link

UpnpInet: remove iphlpapi include #436

Closed neheb closed 4 months ago

neheb commented 4 months ago

Not only is it unused, projects that pass -DNOCOMM under Windows end up failing compilation as more headers need to be included. Simpler to just not include.

mrjimenez commented 4 months ago

It does not pass compilation in the tests, could you review it?

Building Custom Rule D:/a/pupnp/pupnp/upnp/CMakeLists.txt
  upnpapi.c
D:\a\pupnp\pupnp\upnp\src\api\upnpapi.c(3657,24): error C2065: 'PIP_ADAPTER_ADDRESSES': undeclared identifier [D:\a\pupnp\pupnp\build\upnp\upnp_static.vcxproj]
D:\a\pupnp\pupnp\upnp\src\api\upnpapi.c(3657,24): error C2146: syntax error: missing ';' before identifier 'adapts' [D:\a\pupnp\pupnp\build\upnp\upnp_static.vcxproj]
D:\a\pupnp\pupnp\upnp\src\api\upnpapi.c(3657,31): error C2065: 'adapts': undeclared identifier [D:\a\pupnp\pupnp\build\upnp\upnp_static.vcxproj]
D:\a\pupnp\pupnp\upnp\src\api\upnpapi.c(3657,37): warning C4047: '=': 'int' differs in levels of indirection from 'void *' [D:\a\pupnp\pupnp\build\upnp\upnp_static.vcxproj]
D:\a\pupnp\pupnp\upnp\src\api\upnpapi.c(3658,24): error C2065: 'PIP_ADAPTER_ADDRESSES': undeclared identifier [D:\a\pupnp\pupnp\build\upnp\upnp_static.vcxproj]
D:\a\pupnp\pupnp\upnp\src\api\upnpapi.c(3658,24): error C2146: syntax error: missing ';' before identifier 'adapts_item' [D:\a\pupnp\pupnp\build\upnp\upnp_static.vcxproj]
D:\a\pupnp\pupnp\upnp\src\api\upnpapi.c(3658,35): error C2065: 'adapts_item': undeclared identifier [D:\a\pupnp\pupnp\build\upnp\upnp_static.vcxproj]
D:\a\pupnp\pupnp\upnp\src\api\upnpapi.c(3659,30): error C2065: 'PIP_ADAPTER_UNICAST_ADDRESS': undeclared identifier [D:\a\pupnp\pupnp\build\upnp\upnp_static.vcxproj]
D:\a\pupnp\pupnp\upnp\src\api\upnpapi.c(3659,30): error C2146: syntax error: missing ';' before identifier 'uni_addr' [D:\a\pupnp\pupnp\build\upnp\upnp_static.vcxproj]
...
neheb commented 4 months ago

Passes now.

mrjimenez commented 4 months ago

Hi Rosen,

Thank you for your time to review this issue.

Best regards, Marcelo.