Fix build failures with standard C 2023. This patch adds missing function argument types in prototypes, and casts a couple of indirect function calls, to ensure compatibility with the standard C 2023, now selected by default by gcc 15 and later.
do not link against unused libraries dpkg-shlibdeps complained about useless dependencies on libgfortran.so.3, libpng12.so.0, libX11.so.6 and libm.so.6