This fixes the following compilation errors of access/rist.[ch] on OS/2:
-----
CC access/librist_plugin_la-rist.lo
In file included from access/rist.c:41:
access/rist.h: In function 'populate_cname':
access/rist.h:161:22: error: 'INET6_ADDRSTRLEN' undeclared (first use in this function); did you mean 'INET_ADDRSTRLEN'?
161 | char str[INET6_ADDRSTRLEN];
| ^~~~~~~~~~~~~~~~
| INET_ADDRSTRLEN
access/rist.h:161:22: note: each undeclared identifier is reported only once for each function it appears in
access/rist.h:161:18: warning: unused variable 'str' [-Wunused-variable]
161 | char str[INET6_ADDRSTRLEN];
| ^~~
access/rist.c: In function 'print_sockaddr_info_change':
access/rist.c:448:21: error: 'INET6_ADDRSTRLEN' undeclared (first use in this function); did you mean 'INET_ADDRSTRLEN'?
448 | char oldstr[INET6_ADDRSTRLEN];
| ^~~~~~~~~~~~~~~~
| INET_ADDRSTRLEN
access/rist.c:449:14: warning: unused variable 'newstr' [-Wunused-variable]
449 | char newstr[INET6_ADDRSTRLEN];
| ^~~~~~
access/rist.c:448:14: warning: unused variable 'oldstr' [-Wunused-variable]
448 | char oldstr[INET6_ADDRSTRLEN];
| ^~~~~~
access/rist.c: In function 'print_sockaddr_info':
access/rist.c:467:18: error: 'INET6_ADDRSTRLEN' undeclared (first use in this function); did you mean 'INET_ADDRSTRLEN'?
467 | char str[INET6_ADDRSTRLEN];
| ^~~~~~~~~~~~~~~~
| INET_ADDRSTRLEN
access/rist.c:467:14: warning: unused variable 'str' [-Wunused-variable]
467 | char str[INET6_ADDRSTRLEN];
| ^~~
-----
In environments that lack a full locale.h implementation, the C++
headers might implement some fallbacks with the same name
(on windows, libcxx does this).
In these cases, don't provide the normal fallbacks from vlc_fixups.h
when compiling in C++ mode, but include the C++ <locale> header instead.
If <locale> provides locale_t, include the header and define
HAVE_NEWLOCALE (which skips the vlc_fixups.h version of locale_t),
but keep the vlc_fixups.h fallback for uselocale. (One could
also add another configure test for whether <locale> provides
the uselocale function.)
(libcxx doesn't provide any fallback for the uselocale function
since it isn't easily implemented with the msvcrt _locale_t objects.
The libcxx fallback locale_t objects are applied via the setlocale
function, and passed to functions that take a _locale_t parameter.)
(cherry picked from commit 797efbd407)
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
Fixes android build with NDK 17 as lfind is not always available.
(cherry picked from commit cf9bd77c67)
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
Disable calls that are already handled by the NetBSD libc:
- popcount(3)
- popcountll(3)
- bswap16(3)
- bswap32(3)
- bswap64(3)
These functions were renamed to vlc_* in HEAD (vlc-4.x) and since
they are set in stone in the stable releases use ifdef NetBSD here.
This corrects fatal build issues reported on NetBSD.
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
As NetBSD only implements a barely sensical subset of the locale_t API.
(cherry picked from commit 192c77e42d)
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Conflicts:
configure.ac
This is superseded by the compat tdestroy() replacement, which is also
available outside of libvlccore.
(cherry picked from commit d8cc13dd92)
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
This adds a thread-safe tdestroy() replacement for systems without it
but with tfind(). This should fix linking failures on BSD.
(cherry picked from commit 320938b4bf)
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
The sout was destroyed before decoders were deleted. This could lead to a
use-after-free of the sout from the DecoderThread.
To fix this issue, we stop all ES, save the stopped state of all ES, change the
renderer/sout configuration and restart all previously stopped ES.
Deprecate ES_OUT_RESTART_ALL_ES since it was only used for this case. And
replace it by ES_OUT_STOP_ALL_ES/ES_OUT_START_ALL_ES, but in private headers.
(cherry picked from commit 72f780a4b4)
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
Can be used to remix all input channels into one.
Close#8341#18559
(cherry picked from commit 77e46ee5e9)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
This fixes the following compilation breakge on OS/2.
-----
CC network/udp.lo
network/udp.c: In function 'net_SetMcastOut':
network/udp.c:259:17: error: implicit declaration of function 'if_nametoindex'; did you mean 'if_nameindex'? [-Werror=implicit-function-declaration]
int scope = if_nametoindex (iface);
^~~~~~~~~~~~~~
if_nameindex
-----
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
(cherry picked from commit ebcbb4d84e)
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
Within all the introduced static libraries, the module cannot be known
at compilation time. This moves the module name from a compilation
constant to a link time constant string symbol. That way, the same
compiled object within a static library can use a different and correct
module name depending on which plugin it is linked into.
The symbol is hidden so it does not leak between shared objects. For
non-plugins shared libraries (vlccore, vlc, vlc_pulse and
vlc_xcb_events) the module name must be defined manually, unless the
library does not use msg_* macros at all (vlc_vdpau).