[vlc-commits] [Git][videolan/vlc][master] 3 commits: vlc_fixups: include sys/socket.h on OS/2 LIBCn

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Mar 9 07:28:50 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
4baa00c9 by KO Myung-Hun at 2023-03-09T07:11:12+00:00
vlc_fixups: include sys/socket.h on OS/2 LIBCn

LIBCn is a fork of kLIBC, and it has socklen_t in sys/socket.h.

- - - - -
3fb02c60 by KO Myung-Hun at 2023-03-09T07:11:12+00:00
vlc_fixups: define static_assert on OS/2

- - - - -
c4a656a7 by KO Myung-Hun at 2023-03-09T07:11:12+00:00
vlc_fixups: define IN6ADDR_ANY_INIT on OS/2

- - - - -


1 changed file:

- include/vlc_fixups.h


Changes:

=====================================
include/vlc_fixups.h
=====================================
@@ -663,6 +663,12 @@ struct addrinfo
     struct addrinfo *ai_next;
 };
 
+# ifdef __LIBCN__
+/* OS/2 LIBCn has inet_pton(). Because of this, socklen_t is not defined above.
+ * And OS/2 LIBCn has socklen_t. So include sys/socket.h here for socklen_t. */
+#  include <sys/socket.h>
+# endif
+
 const char *gai_strerror (int);
 
 int  getaddrinfo  (const char *node, const char *service,
@@ -697,6 +703,9 @@ struct sockaddr_in6
 static const struct in6_addr in6addr_any =
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
 
+#define IN6ADDR_ANY_INIT \
+    { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } } }
+
 # include <errno.h>
 # ifndef EPROTO
 #  define EPROTO (ELAST + 1)
@@ -705,7 +714,16 @@ static const struct in6_addr in6addr_any =
 # ifndef HAVE_IF_NAMETOINDEX
 #  define if_nametoindex(name)  atoi(name)
 # endif
-#endif
+
+/* static_assert missing in assert.h */
+# if defined(__STDC_VERSION__) && \
+     __STDC_VERSION__ >= 201112L && __STDC_VERSION__ < 202311L
+#  include <assert.h>
+#  ifndef static_assert
+#   define static_assert _Static_assert
+#  endif
+# endif
+#endif  /* __OS2__ */
 
 /* math.h */
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/5fd7deb1ed80c53395531642a5d04a22141f7572...c4a656a7b070891ab9c1497f754d490913e891a7

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/5fd7deb1ed80c53395531642a5d04a22141f7572...c4a656a7b070891ab9c1497f754d490913e891a7
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list