diff --git a/include/vlc_network.h b/include/vlc_network.h index 7cc384587a6f73fb8e166ebc2e359b707373d396..b4d5fabdd67057d4f8c382b43c917333476da39f 100644 --- a/include/vlc_network.h +++ b/include/vlc_network.h @@ -202,6 +202,22 @@ VLC_API int vlc_close(int); /** @} */ +#ifdef _WIN32 +static inline int vlc_getsockopt(int s, int level, int name, + void *val, socklen_t *len) +{ + return getsockopt(s, level, name, (char *)val, len); +} +#define getsockopt vlc_getsockopt + +static inline int vlc_setsockopt(int s, int level, int name, + const void *val, socklen_t len) +{ + return setsockopt(s, level, name, (const char *)val, len); +} +#define setsockopt vlc_setsockopt +#endif + /* Portable network names/addresses resolution layer */ #define NI_MAXNUMERICHOST 64