[vlc-commits] win32: wrap {g,s}etsockopt()
Rémi Denis-Courmont
git at videolan.org
Sun Apr 14 09:05:33 CEST 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Apr 14 09:41:38 2019 +0300| [9a0968867db6b7dc6a25a6357c8e0522c2c8e161] | committer: Rémi Denis-Courmont
win32: wrap {g,s}etsockopt()
char * can alias anything, and Winsock relies on that. Unfortunately,
the compiler still issues warnings. This works around that.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9a0968867db6b7dc6a25a6357c8e0522c2c8e161
---
include/vlc_network.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/include/vlc_network.h b/include/vlc_network.h
index 7cc384587a..50f8fe9eaf 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, 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, val, len);
+}
+#define setsockopt vlc_setsockopt
+#endif
+
/* Portable network names/addresses resolution layer */
#define NI_MAXNUMERICHOST 64
More information about the vlc-commits
mailing list