Created attachment 28844 [details] [review]
I've been able to get libnice to compile using mingw and gcc 4.4.0 on windows xp. It involved a few patches and then a script to do the rest. This was very quick and dirty - if you wanted to incorporate it, you would probably want to clean it up a bit. I didn't want to get into modifying the makefile, so this is just an example bash script (mine's a bit diff. due to how I have things configured):
CFLAGS="-D_SSIZE_T_ -D_WIN32_WINNT=0x0501 -I<SourceDir>/stun/"
./configure --disable-static --enable-shared
#Create a shared library from the archive
dlltool --export-all-symbols -D libnice-0.dll -l libnice.dll.a -z in.def libnice.a
gcc -shared -s -mwindows -def in.def $LibFlags -o libnice-0.dll libnice.a -liphlpapi -lwsock32 -lws2_32 -lglib-2.0 -lgobject-2.0
cp -f libnice.dll.a ../../
cp -f libnice-0.dll ../../
lib.exe /name:libnice-0.dll /out:nice.lib /machine:$MSLibMachine /def:in.def
cp -f nice.lib ../../
#Update .la to reflect shared lib we created
sed -e "s/library_names=''/library_names='libnice.dll.a'/g" -e "s/old_library='libnice.a'/old_library=''/g" -e "s/dlname=''/dlname='..\/bin\/libnice-0.dll'/g" libnice.la > libnice.mod.la
mv -f "libnice.mod.la" "libnice.la"
Created attachment 28845 [details] [review]
Created attachment 28846 [details] [review]
Created attachment 28847 [details] [review]
Could you please provide a proper patch. Cleaned up version of these patches, and hopefully one that doesn't require an additional script somewhere (if it's not doable, then provide the script so it can be added as a Makefile.mingw file for example).
I will merge and release a new version of libnice once I have your fixes.
Migrated to Phabricator: http://phabricator.freedesktop.org/T118