winit/src/platform_impl/linux/dlopen.rs

16 lines
532 B
Rust
Raw Normal View History

#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd"))]
2015-05-08 12:31:56 -05:00
#![allow(dead_code)]
2015-04-25 22:14:30 +02:00
2015-12-01 02:11:54 +01:00
use std::os::raw::{c_void, c_char, c_int};
2015-04-25 22:14:30 +02:00
2015-12-01 02:11:54 +01:00
pub const RTLD_LAZY: c_int = 0x001;
pub const RTLD_NOW: c_int = 0x002;
2015-04-25 22:14:30 +02:00
2019-05-24 21:10:31 +10:00
#[link(name ="dl")]
2015-04-25 22:14:30 +02:00
extern {
2015-12-01 02:11:54 +01:00
pub fn dlopen(filename: *const c_char, flag: c_int) -> *mut c_void;
pub fn dlerror() -> *mut c_char;
pub fn dlsym(handle: *mut c_void, symbol: *const c_char) -> *mut c_void;
pub fn dlclose(handle: *mut c_void) -> c_int;
2015-04-25 22:14:30 +02:00
}