Closed npmccallum closed 5 years ago
I missed this in my first pass. All the C functions that we override or export need to be marked as extern "C". For example:
extern "C"
#[no_mangle] pub fn accept(fd: c_int, addr: *mut libc::sockaddr, addr_len: *mut libc::socklen_t) -> c_int { accept4(fd, addr, addr_len, 0) }
Needs to become:
#[no_mangle] pub extern "C" fn accept(fd: c_int, addr: *mut libc::sockaddr, addr_len: *mut libc::socklen_t) -> c_int { accept4(fd, addr, addr_len, 0) }
Do we need to reorganize the function declaration since we have a format width limitation?
That would be nice, yes. Ideally rustfmt gets run in CI, but there's no CI on this project yet.
rustfmt
I missed this in my first pass. All the C functions that we override or export need to be marked as
extern "C"
. For example:Needs to become: