From 858b07f5065fe0c72d4885d2af6d99ab19a9fde5 Mon Sep 17 00:00:00 2001 From: Daniel Collin Date: Mon, 23 Nov 2015 20:44:21 +0100 Subject: [PATCH] Fixed Linux version --- README.md | 2 +- src/lib.rs | 7 +++++++ src/native/x11/X11MiniFB.c | 1 - 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 238cb15..1441c4b 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ fn main() { Status ------ -Currently Mac and Windows has been tested. Linux will be tested and verified soon. +Currently Mac, Windows has been Linux has been tested which are the supported platforms for now. Build instructions diff --git a/src/lib.rs b/src/lib.rs index 9a66e41..63dc6a0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -19,6 +19,13 @@ extern { fn mfb_close(); } +#[cfg(target_os = "linux")] +#[link(name = "X11")] +extern { + fn mfb_open(name: *const c_char, width: c_int, height: c_int) -> c_int; + fn mfb_update(buffer: *mut c_void) -> c_int; + fn mfb_close(); +} /// /// Open up a window diff --git a/src/native/x11/X11MiniFB.c b/src/native/x11/X11MiniFB.c index c25d9b5..e55face 100644 --- a/src/native/x11/X11MiniFB.c +++ b/src/native/x11/X11MiniFB.c @@ -1,6 +1,5 @@ #include #include -#include ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////