<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
Hello,<br />here is an updated version of the patch.<br /><br />Description of the problem: I am compiling VLC from Git, from a Windows installation using MSYS2 and the mingw-w64 toolchain targetting 32-bit, following the instructions at https://wiki.videolan.org/Win32CompileMSYS/ .<br />During build, this error occurs:<br /><br />source='../../extras/package/win32/../../../modules/services_discovery/upnp.cpp' object='services_discovery/upnp.lo' libtool=yes \<br />DEPDIR=.deps depmode=none /bin/sh ../../extras/package/win32/../../../autotools/depcomp \<br />../doltcompile i686-w64-mingw32-g++ -DHAVE_CONFIG_H -I. -I../../extras/package/win32/../../../modules -I.. -DMODULE_STRING=\"$(p="services_discovery/upnp.lo"; p="${p##*/}"; p="${p#lib}"; p="${p%_plugin*}"; p="${p%.lo}"; echo "$p")\" -D__PLUGIN__ -I../../extras/package/win32/../../../modules/access -I../../extras/package/win32/../../../modules/codec -I../../extras/package/win32/../../../include -I../include -I/c/Users/Fabrizio/Documents/vlc/contrib/i686-w64-mingw32/include -D__USE_MINGW_ANSI_STDIO=1 -g -O2 -I/c/Users/Fabrizio/Documents/vlc/contrib/i686-w64-mingw32/include -mms-bitfields -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wvolatile-register-var -O3 -ffast-math -funroll-loops -fomit-frame-pointer -c -o services_discovery/upnp.lo ../../extras/package/win32/../../../modules/services_discovery/upnp.cpp<br />In file included from ../../extras/package/win32/../../../include/vlc_common.h:43:0,<br /> from ../../extras/package/win32/../../../modules/services_discovery/upnp.hpp:34,<br /> from ../../extras/package/win32/../../../modules/services_discovery/upnp.cpp:35:<br />C:/Users/Fabrizio/Documents/msys32/mingw32/i686-w64-mingw32/include/stdlib.h:346:36: error: conflicting declaration of C function 'int atoi(const char*)'<br /> int __cdecl atoi(const char *_Str);<br /> ^<br />In file included from ../config.h:819:0,<br /> from ../../extras/package/win32/../../../modules/services_discovery/upnp.cpp:32:<br />../../extras/package/win32/../../../include/vlc_fixups.h:304:34: note: previous declaration 'NET_IFINDEX atoi(PCSTR)'<br /> # define if_nametoindex(name) atoi(name)<br /> ^<br />Makefile:11849: recipe for target 'services_discovery/upnp.lo' failed<br />make: *** [services_discovery/upnp.lo] Error 1<br />make: Leaving directory '/c/Users/Fabrizio/Documents/vlc/win32/modules'<br /><br />The root cause is that the configure test incorrectly thinks that if_nametoindex is not defined, so it enables a replacement in vlc_fixups.h. Later, the header file netioapi.h from the Windows headers is included, and that does define if_nametoindex: this causes the error.<br /><br />The patch fixes the test for if_nametoindex for 32-bit Windows. It also cleans up the tests for connect and inet_pton.<br /><br />Regards,<br />Fabrizio<br />
<p>Il 06.01.2015 08:34 fabrizio.ge@tiscali.it ha scritto:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<p>Hello.<br /><br />I tried following the instructions at https://wiki.videolan.org/Win32CompileMSYS/ to compile VLC for Windows, and had to apply some modifications to succeed. The modifications are in the attached patch.<br /><br />By the way, ftp://ftp.videolan.org/pub/videolan/contrib/i686-w64-mingw32/vlc-contrib-i686-w64-mingw32-latest.tar.bz2 is missing the Windows .exe files moc.exe, rcc.exe and uic.exe (the wiki page suggests to run the command</p>
<pre>rm -rf i686-w64-mingw32/bin/moc i686-w64-mingw32/bin/uic i686-w64-mingw32/bin/rcc i686-w64-mingw32/bin/luac
<br />: this is right because those are Linux ELF executables, not Windows executables. However, while luac.exe for Windows is there, Windows versions of the other files are not). I had to compensate for the lack by taking those files from a Qt installation.<br /><br />Regards,<br />Fabrizio </pre>
<p> </p>
<!-- html ignored --><br /><br /><br />
<p>Connetti gratis il mondo con la nuova indoona: hai la chat, le chiamate, le video chiamate e persino le chiamate di gruppo.<br /> E chiami gratis anche i numeri fissi e mobili nel mondo!<br /> Scarica subito l’app Vai su <a href="https://www.indoona.com/">https://www.indoona.com/</a><br /><br /></p>
</blockquote>
</body></html>
<br><br/><br/>Connetti gratis il mondo con la nuova indoona: hai la chat, le chiamate, le video chiamate e persino le chiamate di gruppo.<br />
E chiami gratis anche i numeri fissi e mobili nel mondo!<br />
Scarica subito l’app Vai su <a href='https://www.indoona.com/' target='_Blank'>https://www.indoona.com/</a><br/><br/>