Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use syscall from libc on Linux instead of redefining it #629

Merged
merged 1 commit into from Oct 9, 2018
Merged

Use syscall from libc on Linux instead of redefining it #629

merged 1 commit into from Oct 9, 2018

Conversation

samueltardieu
Copy link
Contributor

libc is already required. Fix #610.

@dhardy
Copy link
Member

dhardy commented Oct 9, 2018

Build failed on Solaris:

$ cargo build --target=x86_64-sun-solaris --all-features
    Updating crates.io index
 Downloading crates ...
  Downloaded syn v0.15.9
  Downloaded proc-macro2 v0.4.20
   Compiling proc-macro2 v0.4.20
   Compiling unicode-xid v0.1.0
   Compiling semver-parser v0.7.0
   Compiling serde v1.0.79
   Compiling cfg-if v0.1.5
   Compiling libc v0.2.43
   Compiling semver v0.9.0
   Compiling packed_simd v0.3.0
   Compiling log v0.4.5
   Compiling rustc_version v0.2.3
   Compiling quote v0.6.8
   Compiling rand_chacha v0.1.0 (/home/travis/build/rust-random/rand/rand_chacha)
   Compiling rand v0.5.5 (/home/travis/build/rust-random/rand)
   Compiling syn v0.15.9
   Compiling serde_derive v1.0.79
   Compiling rand_core v0.3.0 (/home/travis/build/rust-random/rand/rand_core)
   Compiling rand_xorshift v0.1.0 (/home/travis/build/rust-random/rand/rand_xorshift)
   Compiling rand_hc128 v0.1.0 (/home/travis/build/rust-random/rand/rand_hc128)
   Compiling rand_isaac v0.1.0 (/home/travis/build/rust-random/rand/rand_isaac)
error[E0425]: cannot find function `syscall` in module `libc`
   --> src/rngs/os.rs:687:19
    |
687 |             libc::syscall(SYS_GETRANDOM, buf.as_mut_ptr(), buf.len(),
    |                   ^^^^^^^ not found in `libc`

@samueltardieu
Copy link
Contributor Author

@dhardy This can only be used on Linux indeed. I pushed an updated patch which lets the Solaris part untouched.

@samueltardieu samueltardieu changed the title Use syscall from libc instead of redefining it Use syscall from libc on Linux instead of redefining it Oct 9, 2018
@dhardy
Copy link
Member

dhardy commented Oct 9, 2018

Thanks @samueltardieu!

@dhardy dhardy merged commit 0911a4e into rust-random:master Oct 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants