lavv17 / lftp

sophisticated command line file transfer program (ftp, http, sftp, fish, torrent)
http://lftp.yar.ru
GNU General Public License v3.0
1.11k stars 162 forks source link

Does not compile with clang 12 #611

Open fxcoudert opened 4 years ago

fxcoudert commented 4 years ago

lftp does not compile with clang 12, which is the system compiler on macOS 10.15 and 11.0.

trio is incorrectly detected:

checking if trio library is needed... yes (because %lld fails)

because the test fails to include the system header:

conftest.c:425:6: error: implicitly declaring library function 'sscanf' with type 'int (const char *restrict, const char *restrict, ...)' [-Werror,-Wimplicit-function-declaration]
            sscanf("0","%llu",&x);
            ^
conftest.c:425:6: note: include the header <stdio.h> or explicitly provide a declaration for 'sscanf'
conftest.c:433:6: error: implicitly declaring library function 'sprintf' with type 'int (char *, const char *, ...)' [-Werror,-Wimplicit-function-declaration]
            sprintf(buf,"%lld %llu",y,x);
            ^
conftest.c:433:6: note: include the header <stdio.h> or explicitly provide a declaration for 'sprintf'

The test LFTP_NEED_TRIO in m4/needtrio.m4 should be fixed to include <stdio.h>