[vlc-devel] [PATCH] Contrib: fix UPNP building on Win32

Steve Lhomme robux4 at videolabs.io
Mon Mar 2 18:54:06 CET 2015


On Mon, Mar 2, 2015 at 5:01 PM, Steve Lhomme <robux4 at videolabs.io> wrote:
> It's
> http://downloads.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.2/threads-win32/sjlj/i686-4.9.2-release-win32-sjlj-rt_v3-rev1.7z
>
> On Mon, Mar 2, 2015 at 5:00 PM, Steve Lhomme <robux4 at videolabs.io> wrote:
>> On Mon, Mar 2, 2015 at 4:41 PM, Steve Lhomme <robux4 at videolabs.io> wrote:
>>> On Mon, Mar 2, 2015 at 4:32 PM, Jean-Baptiste Kempf <jb at videolan.org> wrote:
>>>> On 02 Mar, Steve Lhomme wrote :
>>>>> Fixes #14057
>>>>> ---
>>>>>  modules/services_discovery/upnp.hpp | 4 ++++
>>>>>  1 file changed, 4 insertions(+)
>>>>>
>>>>> diff --git a/modules/services_discovery/upnp.hpp b/modules/services_discovery/upnp.hpp
>>>>> index 23fe4db..09e1bc3 100644
>>>>> --- a/modules/services_discovery/upnp.hpp
>>>>> +++ b/modules/services_discovery/upnp.hpp
>>>>> @@ -28,6 +28,10 @@
>>>>>  #include <vector>
>>>>>  #include <string>
>>>>>
>>>>> +#ifdef _WIN32
>>>>> +# undef if_nametoindex
>>>>> +#endif
>>>>
>>>> Your mingw header is declaring if_nametoindex with the wrong WIN32_WINNT
>>>> guards.
>>>
>>>
>>> No it's guarded with _WIN32_WINT >= 0x600, which corresponds to the
>>> availability in Windows.
>>> https://msdn.microsoft.com/en-us/library/windows/desktop/bb408409%28v=vs.85%29.aspx
>>
>> You're right I was looking at the one detected by QtCreator, which is
>> correct. The one in my mingw32 folder is wrong.
>>
>> It comes from this file that is recommended in the Win32 compile instructions.
>> http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.2/threads-win32/sjlj/i686-4.9.2-release-win32-sjlj-rt_v3-rev0.7z/download
>>
>> Do we still need this hack ? There's a newer version of this package,
>> but the netioapi.h file is still bogus.
>> http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.2/threads-win32/sjlj/i686-4.9.2-release-win32-sjlj-rt_v3-rev0.7z/download

Looks like they haven't fixed that yet in their base code.
http://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-headers/include/netioapi.h



More information about the vlc-devel mailing list