dhardy / rand

http://doc.rust-lang.org/rand
Other
2 stars 2 forks source link

Fix `JitterRng` on Mac OS #57

Closed pitdicker closed 6 years ago

pitdicker commented 6 years ago

Use libc::mach_absolute_time instead of std::time::SystemTime.

dhardy commented 6 years ago

No libc on iOS. The build passed on that platform but tests weren't run: https://travis-ci.org/dhardy/rand/builds/304256548

Edit: tests enabled (I think they should work?); check result later: https://travis-ci.org/dhardy/rand/builds/304970124

pitdicker commented 6 years ago

Yay, it works 🎉.

In trust tests on some platforms were disabled, I suppose because they do not work.

dhardy commented 6 years ago

I'm confused. Did you change something to fix the iOS build?

I guess those tests were disabled is that cross is cross-compiling, and the target binaries aren't executable on the build machine. So we'd need an emulator or actual iOS hardware to check. It's the same for any other cross-built platforms I guess.

pitdicker commented 6 years ago

Did you change something to fix the iOS build?

Yes, I abused the CI to test on Mac OS, and got it wrong the first two tries.