Skip to content
This repository has been archived by the owner on Apr 2, 2018. It is now read-only.

0.2 does not compile on i686-pc-windows-gnu #43

Open
fafhrd91 opened this issue Mar 31, 2018 · 1 comment
Open

0.2 does not compile on i686-pc-windows-gnu #43

fafhrd91 opened this issue Mar 31, 2018 · 1 comment

Comments

@fafhrd91
Copy link

seems does not compile on any windows i686 targets

error[E0412]: cannot find type `Ordering` in this scope
  --> C:\Users\appveyor\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-timer-0.2.0\src\atomic.rs:64:42
   |
64 |         pub fn store(&self, val: u64, _: Ordering) {
   |                                          ^^^^^^^^ not found in this scope
help: possible candidates are found in other modules, you can import them into scope
   |
46 |     use std::cmp::Ordering;
   |
46 |     use std::sync::atomic::Ordering;
   |
@cmoerz
Copy link

cmoerz commented Apr 1, 2018

After running into this on an ARM system, I was able to fix this quite simply by going into tokio-timer-0.2.0\src\atomic.rs and fixing the missing use; appears this wasn't properly tested on a 64bit system.

add the following line at line 47:
use std::sync::atomic::{AtomicUsize, Ordering};

like in the following snippet:

#[cfg(not(target_pointer_width = "64"))]

mod imp {
use std::sync::Mutex;
use std::sync::atomic::{AtomicUsize, Ordering};

#[derive(Debug)]
pub struct AtomicU64 {
    inner: Mutex<u64>,
}

impl AtomicU64 {
    pub fn new(val: u64) -> AtomicU64 {

`

and you should then be able to compile. Sorry for not having any diff or pull request, didn't want to fiddle around with github just for letting people know how this might get fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants