Page MenuHomePhabricator

libssh 0.9.0 issue for mingw build
Closed, ResolvedPublic

Description

See https://travis-ci.org/ashkulz/NppFTP/jobs/552373991 building libssh 0.9.0 with i686-w64-mingw32-gcc (on older ubuntu 14.04 with gcc 4.8.4) leading to compiler issue:

/home/travis/build/ashkulz/NppFTP/x86/obj/libssh/src/dh_crypto.c: In function ‘ssh_dh_set_parameters’:
/home/travis/build/ashkulz/NppFTP/x86/obj/libssh/src/dh_crypto.c:104:5: error: ‘for’ loop initial declarations are only allowed in C99 mode

for (int i = 0; i < 2; i++) {
^

/home/travis/build/ashkulz/NppFTP/x86/obj/libssh/src/dh_crypto.c:104:5: note: use option -std=c99 or -std=gnu99 to compile your code
make[3]: *** [src/CMakeFiles/ssh_shared.dir/dh_crypto.c.obj] Error 1

-> requiring c99 gcc setting, but that is not configured via cmake.

See https://stackoverflow.com/questions/24840030/forcing-c99-in-cmake-to-use-for-loop-initial-declaration

Event Timeline

chcg created this task.Jun 30 2019, 2:21 PM
chcg updated the task description. (Show Details)Jul 4 2019, 11:23 PM
chcg added a project: Restricted Project.
Jakuje closed this task as Resolved.Aug 1 2019, 3:07 PM
Jakuje claimed this task.
Jakuje added a subscriber: Jakuje.