Yep, that prototype should be extern int sortf(const void *, const void *); and after fixing it there are no further errors with gcc 14.