Commit 7967b710 authored by Jeremy Soller's avatar Jeremy Soller

Fix Redox compilation if Redox becomes a part of the unix target family

parent 07c4ae3f
[package]
name = "orbclient"
version = "0.3.21"
version = "0.3.22"
authors = ["Jeremy Soller <jackpot51@gmail.com>"]
description = "The Orbital Client Library"
documentation = "https://docs.rs/orbclient"
......@@ -20,7 +20,7 @@ no_std = []
[lib]
name = "orbclient"
path = "src/lib.rs"
[target.'cfg(all(not(feature="no_std"), any(unix, windows)))'.dependencies]
[target.'cfg(all(not(feature="no_std"), not(target_os = "redox")))'.dependencies]
sdl2 = "0.31.0"
[target.'cfg(all(not(feature="no_std"), target_os="redox"))'.dependencies]
redox_syscall = "0.1.43"
......@@ -46,6 +46,6 @@ pub enum Mode {
#[path = "sys/orbital.rs"]
mod sys;
#[cfg(all(not(feature = "no_std"), any(unix, windows)))]
#[cfg(all(not(feature = "no_std"), not(target_os = "redox")))]
#[path = "sys/sdl2.rs"]
mod sys;
......@@ -136,7 +136,7 @@ impl Window {
"orbital:{}/{}/{}/{}/{}/{}",
flag_str, x, y, w, h, title
)) {
if let Ok(address) = unsafe { syscall::fmap(file.as_raw_fd(), &syscall::Map {
if let Ok(address) = unsafe { syscall::fmap(file.as_raw_fd() as usize, &syscall::Map {
offset: 0,
size: (w * h * 4) as usize,
flags: syscall::PROT_READ | syscall::PROT_WRITE,
......@@ -221,7 +221,7 @@ impl Window {
.write(&format!("S,{},{}", width, height).as_bytes());
self.sync_path();
unsafe {
let address = syscall::fmap(self.file.as_raw_fd(), &syscall::Map {
let address = syscall::fmap(self.file.as_raw_fd() as usize, &syscall::Map {
offset: 0,
size: (self.w * self.h * 4) as usize,
flags: syscall::PROT_READ | syscall::PROT_WRITE,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment