Skip to content

libc::c_void and std::os::raw::c_void are incompatible #59

Closed
@SSheldon

Description

@SSheldon
extern crate libc;

use std::os::raw;
use std::ptr;

fn main() {
    let a: *mut raw::c_void = ptr::null_mut();
    let b: *mut libc::c_void = a;
}
error: mismatched types:
 expected `*mut libc::c_void`,
    found `*mut std::os::raw::c_void`
(expected enum `libc::c_void`,
    found enum `std::os::raw::c_void`)

Since c_void is defined in the standard library, I'd expect this crate to be compatible with it. Could we change libc::c_void to be a re-export of std::os::raw::c_void?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions