From 0417f7003f133fbef63e8e9d98d305368b1eed47 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Sat, 25 Apr 2015 22:14:30 +0200 Subject: Allow using EGL with X11 --- src/api/dlopen.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/api/dlopen.rs (limited to 'src/api/dlopen.rs') diff --git a/src/api/dlopen.rs b/src/api/dlopen.rs new file mode 100644 index 0000000..63f690a --- /dev/null +++ b/src/api/dlopen.rs @@ -0,0 +1,14 @@ +#![cfg(target_os = "linux")] + +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; +} -- cgit v1.2.3