[FFmpeg-devel] [PATCH] Enable proper IPv6 functions on windows

Martin Storsjö martin
Sat Jan 16 14:58:50 CET 2010

On Sat, 16 Jan 2010, Reimar D?ffinger wrote:

> On Sat, Jan 16, 2010 at 11:42:56AM +0200, Martin Storsj? wrote:
> > Yes, your approach is much simpler in that sense, and shouldn't have any 
> > thread safety issues either. GetModuleHandle instead of LoadLibrary should 
> > be ok, too, since we actually link to that dll. The only drawback is that 
> > it pollutes the generic fallback wrappers with platform specific code.
> I don't dispute it's ugly, but the configure changes don't exactly look
> non-ugly to me either while giving much worse usability.

Ok, so here's the two options:

win-ipv6-load.patch adds a winsock specific GetModuleHandle + 
GetProcAddress at the beginning of each of the wrapper fallbacks, making 
it backwards compatible while giving the new functionality on newer 
versions. If this path is chosen, commit 21227 can (should?) be reverted.

Reimar, does this one look sensible to you?

0001... first changes the current addition of the _WIN32_WINNT 
define to only be added if target-os = mingw32, for other ones (mingw32ce, 
mingw32-prexp or mingw32-foobar or whatever), no define is added. The 
follow-up, 0002 checks for getaddrinfo in ws2tcpip.h, which succeeds 
or fails depending on the target-os selection.

So, please vote on which direction you prefer.

// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: win-ipv6-load.patch
Type: text/x-diff
Size: 2530 bytes
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100116/210adeec/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Only-define-_WIN32_WINNT-0x0501-if-target_os-mingw32.patch
Type: text/x-diff
Size: 1789 bytes
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100116/210adeec/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Check-for-getaddrinfo-in-the-winsock-headers.patch
Type: text/x-diff
Size: 1119 bytes
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100116/210adeec/attachment-0002.patch>

More information about the ffmpeg-devel mailing list