libssh2

array type has incomplete element type ‘struct iovec’


I am trying to build libssh2 using cmake. I have downloaded current master commit cfe0bf64985fd6a5db3b45ffc31a2fe3b8fd9948. When I run the build command, I get this compile error:

extern/libssh2/src/libssh2_priv.h:907:38: error: array type has incomplete element type ‘struct iovec’
                   const struct iovec datavec[], void **abstract);
                                      ^~~~~~~

I am using a debian 10.6 machine and my gcc version is 8.3.0.


Solution

  • There was a colon in the path and removing it solved the problem.

    Next question: Why it didn't make any problem to build C++ apps?