This should sort properly on Windows and any other platform without
qsort_r(). It does _not_ fix any potential issues on any platforms with
an incompatible qsort_r() prototype (such as FreeBSD < 13).
We detect whether math functions are located in -lm in configure.ac.
Reuse the deliberable of this check and link libcompat with $(LIBM).
This is required at least for sincos() functions and it has been
reported as required on NetBSD 8.0.
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
On Windows if you allocate aligned memory you need to free it with an aligned
version of free.
This is similar to the old vlc_memalign() + vlc_free()
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
On Pepper 49, recvmsg and sendmsg are implemented as stubs, which always
return ENOTSUP. Proper implementations for these functions will become
available in later Pepper versions, which should make these compat
functions obsolete.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Implement a sigwait dummy for NaCl, which relies on:
- NaCl does never send SIGPIPE to to apps (see
https://codereview.chromium.org/288063004/)
- VLC uses sigwait exclusively to wait for SIGPIPE
If sigwait is asked to wait for anything else than SIGPIPE it will run
into an assertion failure, so that breakage would not be silent.
Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
newlib provides an flockfile implementation via sys/io.h, which is
marked as internal. As we do not have a better alternative make use of
it here, albeit being marked as internal.
Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
This fixes the following linkage error.
-----
CCLD libhttps_plugin.la
weakld: error: Unresolved symbol (UNDEF) '_gai_strerror'.
weakld: info: The symbol is referenced by:
P:\tmp\ldconv_libvlc_http_la-transport_o_64fd5671f455159d80.obj
Ignoring unresolved externals reported from weak prelinker.
Error! E2028: _gai_strerror is an undefined reference
file P:/tmp\ldconv_libvlc_http_la-transport_o_64fd5671f455159d80.obj(ldconv_libvlc_http_la-transport_o_64fd5671f455159d80.obj): undefined symbol _gai_strerror
make.exe[4]: *** [libhttps_plugin.la] Error 1
-----
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
The prototype of timegm() does not have 'const'.
This fixes compilation on OS/2 which have only a declaration of
timegm().
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>