I am working with openssl from system(for now) and I need to send data using SSL_write witch expects
SSL_write(ssl: ?*SSL, buf: ?*const anyopaque, num: c_int)
This is the code I have writing https://zigbin.io/a8c4bd
I get this error
src/main.zig:103:32: error: expected type '?*const anyopaque', found '*const []u8'
if (openssl.SSL_write(ssl, &data, data.len) <= 0) {
^~~~~
src/main.zig:103:32: note: cannot implicitly cast double pointer '*const []u8' to anyopaque pointer '?*const anyopaque'
/home/redviking/projects/gemini-protocol/.zig-cache/o/8ea255c94f3e7fa3025fd9d3a12386ad/cimport.zig:8619:42: note: parameter type declared here
pub extern fn SSL_write(ssl: ?*SSL, buf: ?*const anyopaque, num: c_int) c_int;
^~~~~~~~~~~~~~~~~
Can anyone explain why this happens and how to fix it