Skip to content

Commit

Permalink
fixes zero-sized structs in FFI
Browse files Browse the repository at this point in the history
  • Loading branch information
dcuddeback committed Oct 18, 2015
1 parent 1d2d69e commit 52aa9fd
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,34 @@ pub use hwdb::*;


#[repr(C)]
pub struct udev;
pub struct udev {
__private: c_void,
}

#[repr(C)]
pub struct udev_list_entry;
pub struct udev_list_entry {
__private: c_void,
}

#[repr(C)]
pub struct udev_device;
pub struct udev_device {
__private: c_void,
}

#[repr(C)]
pub struct udev_monitor;
pub struct udev_monitor {
__private: c_void,
}

#[repr(C)]
pub struct udev_enumerate;
pub struct udev_enumerate {
__private: c_void,
}

#[repr(C)]
pub struct udev_queue;
pub struct udev_queue {
__private: c_void,
}

extern "C" {
// udev
Expand Down Expand Up @@ -123,11 +135,13 @@ extern "C" {

#[cfg(hwdb)]
mod hwdb {
use super::libc::{c_uint,c_char};
use super::libc::{c_void,c_uint,c_char};
use super::{udev,udev_list_entry};

#[repr(C)]
pub struct udev_hwdb;
pub struct udev_hwdb {
__private: c_void,
}

extern "C" {
pub fn udev_hwdb_ref(hwdb: *mut udev_hwdb) -> *mut udev_hwdb;
Expand Down

0 comments on commit 52aa9fd

Please sign in to comment.