diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-04-26 08:02:19 +0200 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-04-26 08:02:19 +0200 |
commit | 8cbd57a307392e5ccb48905f3fc7b1e66cd3384a (patch) | |
tree | ab8ffec55c47ba2e5cd9a2c7895773e840d6e213 /src/api/dlopen.rs | |
parent | 9a0ca92692b0d5c60e89dbdc18cafb5c468e75b0 (diff) | |
parent | 0417f7003f133fbef63e8e9d98d305368b1eed47 (diff) | |
download | glutin-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.rs | 14 |
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; +} |