Skip to content
  • Martin Storsjö's avatar
    contrib: upnp: Improve and generalize a patch for handling inet_pton · fa05e80c
    Martin Storsjö authored
    libupnp locally overrides the version of _WIN32_WINNT via
    configure.ac and autoconfig.h (which is disabled by a vlc contrib
    patch when targeting winrt though).
    
    Make sure that autoconfig.h is included everywhere necessary, to
    show/hide the relevant parts of winsock headers depending on the
    chosen version of _WIN32_WINNT (either default or overridden).
    
    This avoids including the system declarations of these functions if
    the default target is >= vista but the build tries to override it
    to a lower version.
    
    On the other hand, if the override of _WIN32_WINNT is removed (as
    when targeting winrt) and the default is >= vista, skip the local
    version of inet_pton.
    
    This should have the same effect as the previous patch, but
    evaluated by the preprocessor instead of hardcoding commenting out
    of certain source files.
    fa05e80c