diff --git a/src/libinput.rs b/src/libinput.rs index 5159a46e..9cf6090f 100644 --- a/src/libinput.rs +++ b/src/libinput.rs @@ -86,7 +86,7 @@ pub struct LibInput { li: *mut libinput, } -extern "C" { +unsafe extern "C" { fn jay_libinput_log_handler_bridge(); } diff --git a/src/libinput/sys.rs b/src/libinput/sys.rs index 56f7a7c8..a30c6ea0 100644 --- a/src/libinput/sys.rs +++ b/src/libinput/sys.rs @@ -34,7 +34,7 @@ pub struct libinput_tablet_tool(u8); pub struct libinput_event_touch(u8); #[link(name = "input")] -extern "C" { +unsafe extern "C" { pub fn libinput_log_set_handler(libinput: *mut libinput, log_handler: libinput_log_handler); pub fn libinput_log_set_priority(libinput: *mut libinput, priority: libinput_log_priority); pub fn libinput_path_create_context( diff --git a/src/pango.rs b/src/pango.rs index afce8b40..26c195ef 100644 --- a/src/pango.rs +++ b/src/pango.rs @@ -20,7 +20,7 @@ struct cairo_surface_t(u8); struct cairo_t(u8); #[link(name = "cairo")] -extern "C" { +unsafe extern "C" { fn cairo_image_surface_create( format: cairo_format_t, width: c::c_int, @@ -47,7 +47,7 @@ extern "C" { struct PangoContext_(u8); #[link(name = "pangocairo-1.0")] -extern "C" { +unsafe extern "C" { fn pango_cairo_create_context(cr: *mut cairo_t) -> *mut PangoContext_; fn pango_cairo_show_layout(cr: *mut cairo_t, layout: *mut PangoLayout_); } @@ -56,7 +56,7 @@ extern "C" { struct GObject(u8); #[link(name = "gobject-2.0")] -extern "C" { +unsafe extern "C" { fn g_object_unref(object: *mut GObject); } @@ -66,7 +66,7 @@ struct PangoFontDescription_(u8); struct PangoLayout_(u8); #[link(name = "pango-1.0")] -extern "C" { +unsafe extern "C" { fn pango_font_description_from_string(str: *const c::c_char) -> *mut PangoFontDescription_; fn pango_font_description_free(desc: *mut PangoFontDescription_); fn pango_font_description_get_size(desc: *mut PangoFontDescription_) -> c::c_int; diff --git a/src/udev.rs b/src/udev.rs index 777e76e4..fe077a96 100644 --- a/src/udev.rs +++ b/src/udev.rs @@ -19,7 +19,7 @@ struct udev_list_entry(u8); struct udev_device(u8); #[link(name = "udev")] -extern "C" { +unsafe extern "C" { fn udev_new() -> *mut udev; fn udev_unref(udev: *mut udev) -> *mut udev; diff --git a/src/video/gbm.rs b/src/video/gbm.rs index 9a57c92a..6fbee1d1 100644 --- a/src/video/gbm.rs +++ b/src/video/gbm.rs @@ -83,7 +83,7 @@ struct gbm_import_fd_modifier_data { } #[link(name = "gbm")] -extern "C" { +unsafe extern "C" { fn gbm_create_device(fd: c::c_int) -> *mut Device; fn gbm_device_destroy(dev: *mut Device); diff --git a/src/xkbcommon.rs b/src/xkbcommon.rs index c4cd21e2..0e14b3e2 100644 --- a/src/xkbcommon.rs +++ b/src/xkbcommon.rs @@ -71,7 +71,7 @@ impl Default for xkb_rule_names { } #[link(name = "xkbcommon")] -extern "C" { +unsafe extern "C" { fn xkb_context_new(flags: xkb_context_flags) -> *mut xkb_context; fn xkb_context_unref(context: *mut xkb_context); fn xkb_context_set_log_verbosity(context: *mut xkb_context, verbosity: c::c_int); @@ -121,7 +121,7 @@ pub struct XkbContext { ids: KeymapIds, } -extern "C" { +unsafe extern "C" { fn jay_xkbcommon_log_handler_bridge(); }