Fix build with gcc
Correctly declare function without arguments as f(void) instead of f().
(cherry picked from commit 6409e594272f66ce3896706ac705bbd465ce233e)