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

Does not compile on Windows #16

Closed
RAnders00 opened this issue Jul 19, 2020 · 1 comment
Closed

Does not compile on Windows #16

RAnders00 opened this issue Jul 19, 2020 · 1 comment

Comments

@RAnders00
Copy link

Below is the error I get, using rust distribution nightly-x86_64-pc-windows-msvc (also tried gnu, same error)

error[E0425]: cannot find function `sysconf` in crate `libc`
   --> C:\Users\Ruben Anders\.cargo\registry\src\github.com-1ecc6299db9ec823\sys-info-0.5.10\lib.rs:396:34
    |
396 |             let buf_size = libc::sysconf(libc::_SC_HOST_NAME_MAX) as usize;
    |                                  ^^^^^^^ not found in `libc`

error[E0425]: cannot find value `_SC_HOST_NAME_MAX` in crate `libc`
   --> C:\Users\Ruben Anders\.cargo\registry\src\github.com-1ecc6299db9ec823\sys-info-0.5.10\lib.rs:396:48
    |
396 |             let buf_size = libc::sysconf(libc::_SC_HOST_NAME_MAX) as usize;
    |                                                ^^^^^^^^^^^^^^^^^ not found in `libc`

error[E0425]: cannot find function `gethostname` in crate `libc`
   --> C:\Users\Ruben Anders\.cargo\registry\src\github.com-1ecc6299db9ec823\sys-info-0.5.10\lib.rs:398:22
    |
398 |               if libc::gethostname(buf.as_mut_ptr() as *mut libc::c_char, buf_size) < 0 {
    |                        ^^^^^^^^^^^ help: a function with a similar name exists: `getsockname`
    | 
   ::: C:\Users\Ruben Anders\.cargo\registry\src\github.com-1ecc6299db9ec823\libc-0.2.72\src\windows\mod.rs:556:5
    |
556 | /     pub fn getsockname(
557 | |         s: SOCKET,
558 | |         name: *mut ::sockaddr,
559 | |         nameln: *mut ::c_int,
560 | |     ) -> ::c_int;
    | |_________________- similarly named function `getsockname` defined here
@RonnyChan-okta
Copy link
Contributor

Should be fixed in #18

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

No branches or pull requests

2 participants