diff --git a/configure.ac b/configure.ac index e70610324367..e848d725413d 100644 --- a/configure.ac +++ b/configure.ac @@ -524,6 +524,7 @@ AS_IF([test "${SYS}" = "mingw32"],[ AS_IF([test "${enable_winstore_app}" = "yes"], [ vlc_winstore_app=1 VLC_ADD_LIBS([libvlccore], [-lole32 -lruntimeobject]) + AC_LIBOBJ([gai_strerror]) ],[ VLC_ADD_LIBS([libvlccore],[-lwinmm]) ]) diff --git a/include/vlc_network.h b/include/vlc_network.h index 28a9fa623966..bfb427447077 100644 --- a/include/vlc_network.h +++ b/include/vlc_network.h @@ -198,8 +198,10 @@ VLC_API ssize_t net_vaPrintf( vlc_object_t *p_this, int fd, const char *psz_fmt, #endif #ifdef _WIN32 -# undef gai_strerror -# define gai_strerror gai_strerrorA +# if !defined(WINAPI_FAMILY) || WINAPI_FAMILY != WINAPI_FAMILY_APP +# undef gai_strerror +# define gai_strerror gai_strerrorA +# endif #endif #ifdef __OS2__