aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/dlopen.rs
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-04-26 08:02:19 +0200
committertomaka <pierre.krieger1708@gmail.com>2015-04-26 08:02:19 +0200
commit8cbd57a307392e5ccb48905f3fc7b1e66cd3384a (patch)
treeab8ffec55c47ba2e5cd9a2c7895773e840d6e213 /src/api/dlopen.rs
parent9a0ca92692b0d5c60e89dbdc18cafb5c468e75b0 (diff)
parent0417f7003f133fbef63e8e9d98d305368b1eed47 (diff)
downloadglutin-8cbd57a307392e5ccb48905f3fc7b1e66cd3384a.tar.gz
glutin-8cbd57a307392e5ccb48905f3fc7b1e66cd3384a.zip
Merge pull request #399 from tomaka/egl-linux
Allow using EGL with X11
Diffstat (limited to 'src/api/dlopen.rs')
-rw-r--r--src/api/dlopen.rs14
1 files changed, 14 insertions, 0 deletions
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;
+}