Build failure: ‘SSIZE_MAX’ undeclared (first use in this function)
Building VLC 3.0.0 fails with the error below on a Linux From Scratch system.
/dev/shm/bee-root/vlc/vlc-3.0.0-0/source/configure --prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --sysconfdir=/etc --sharedstatedir=/var --localstatedir=/var --libdir=/usr/lib --includedir=/usr/include --datarootdir=/usr/share --datadir=/usr/share --infodir=/usr/share/info --localedir=/usr/share/locale --mandir=/usr/share/man --docdir=/usr/share/doc/vlc --exec-prefix=/usr
[…]
libvlc configuration
--------------------
version : 3.0.0
system : linux
architecture : x86_64 mmx sse sse2
optimizations : yes
vlc aliases : cvlc rvlc qvlc svlc
To build vlc and its plugins, type `make', or `./compile' if you like nice colors.
$ make -j6
[…]
In file included from /dev/shm/bee-root/vlc/vlc-3.0.0-0/source/modules/demux/mp4/libmp4.c:27:0:
/dev/shm/bee-root/vlc/vlc-3.0.0-0/source/modules/demux/mp4/libmp4.c: In function ‘mp4_readbox_enter_common’:
/dev/shm/bee-root/vlc/vlc-3.0.0-0/source/modules/demux/mp4/libmp4.c:117:64: error: ‘SSIZE_MAX’ undeclared (first use in this function)
if( unlikely(readsize < headersize) || unlikely(readsize > SSIZE_MAX) )
^
/dev/shm/bee-root/vlc/vlc-3.0.0-0/source/include/vlc_common.h:114:44: note: in definition of macro ‘unlikely’
# define unlikely(p) __builtin_expect(!!(p), 0)
^
/dev/shm/bee-root/vlc/vlc-3.0.0-0/source/modules/demux/mp4/libmp4.c:117:64: note: each undeclared identifier is reported only once for each function it appears in
if( unlikely(readsize < headersize) || unlikely(readsize > SSIZE_MAX) )
^
/dev/shm/bee-root/vlc/vlc-3.0.0-0/source/include/vlc_common.h:114:44: note: in definition of macro ‘unlikely’
# define unlikely(p) __builtin_expect(!!(p), 0)
^
/dev/shm/bee-root/vlc/vlc-3.0.0-0/source/modules/demux/mp4/libmp4.c: In function ‘MP4_ReadBox_hdlr’:
/dev/shm/bee-root/vlc/vlc-3.0.0-0/source/modules/demux/mp4/libmp4.c:1363:19: error: ‘SSIZE_MAX’ undeclared (first use in this function)
if( i_read >= SSIZE_MAX )
^
CC demux/mp4/essetup.lo
Makefile:19570: recipe for target 'demux/mp4/libmp4.lo' failed
make[4]: *** [demux/mp4/libmp4.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
/dev/shm/bee-root/vlc/vlc-3.0.0-0/source/modules/demux/avi/avi.c: In function ‘Demux_Seekable’:
/dev/shm/bee-root/vlc/vlc-3.0.0-0/source/include/vlc_threads.h:878:19: warning: call to ‘harmful_delay.constprop’ declared with attribute warning: use proper event handling instead of short delay
#define msleep(d) msleep(check_delay(d))
^
/dev/shm/bee-root/vlc/vlc-3.0.0-0/source/modules/demux/avi/avi.c:1201:25: note: in expansion of macro ‘msleep’
msleep( 10000 );
^
[…]