winit-sonoma-fix/src/api/dlopen.rs

16 lines
513 B
Rust
Raw Normal View History

#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))]
2015-05-09 03:31:56 +10:00
#![allow(dead_code)]
2015-04-26 06:14:30 +10:00
use libc;
pub const RTLD_LAZY: libc::c_int = 0x001;
pub const RTLD_NOW: libc::c_int = 0x002;
#[link="dl"]
extern {
pub fn dlopen(filename: *const libc::c_char, flag: libc::c_int) -> *mut libc::c_void;
pub fn dlerror() -> *mut libc::c_char;
pub fn dlsym(handle: *mut libc::c_void, symbol: *const libc::c_char) -> *mut libc::c_void;
pub fn dlclose(handle: *mut libc::c_void) -> libc::c_int;
}