Giter Club home page Giter Club logo

Comments (3)

ekzhang avatar ekzhang commented on June 7, 2024

What's your rustc version? I googled this and found https://users.rust-lang.org/t/cannot-compile-simple-tokio-example/109956/5 as a potential solution.

from sshx.

tanqiangyes avatar tanqiangyes commented on June 7, 2024

yes,I updated rust version to 79, use nightly, but there still other errors:

error[E0425]: cannot find function `sysconf` in crate `libc`
  --> C:\Users\admin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\close_fds-0.3.2\src\iterfds\fditer.rs:96:38
   |
96 |         let fdlimit = unsafe { libc::sysconf(libc::_SC_OPEN_MAX) };
   |                                      ^^^^^^^ not found in `libc`

error[E0425]: cannot find value `_SC_OPEN_MAX` in crate `libc`
   --> C:\Users\admin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\close_fds-0.3.2\src\iterfds\fditer.rs:96:52
    |
96  |         let fdlimit = unsafe { libc::sysconf(libc::_SC_OPEN_MAX) };
    |                                                    ^^^^^^^^^^^^ help: a constant with a similar name exists: `FOPEN_MAX`
    |
   ::: C:\Users\admin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\libc-0.2.153\src\windows\mod.rs:119:1
    |
119 | pub const FOPEN_MAX: ::c_uint = 20;
    | ----------------------------- similarly named constant `FOPEN_MAX` defined here

error[E0425]: cannot find function `fcntl` in crate `libc`
   --> C:\Users\admin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\close_fds-0.3.2\src\util.rs:128:20
    |
128 |     unsafe { libc::fcntl(fd, libc::F_GETFD) >= 0 }
    |                    ^^^^^ not found in `libc`

error[E0425]: cannot find value `F_GETFD` in crate `libc`
   --> C:\Users\admin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\close_fds-0.3.2\src\util.rs:128:36
    |
128 |     unsafe { libc::fcntl(fd, libc::F_GETFD) >= 0 }
    |                                    ^^^^^^^ not found in `libc`

error[E0425]: cannot find function `fcntl` in crate `libc`
   --> C:\Users\admin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\close_fds-0.3.2\src\util.rs:166:32
    |
166 |     let flags = unsafe { libc::fcntl(fd, libc::F_GETFD) };
    |                                ^^^^^ not found in `libc`

error[E0425]: cannot find value `F_GETFD` in crate `libc`
   --> C:\Users\admin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\close_fds-0.3.2\src\util.rs:166:48
    |
166 |     let flags = unsafe { libc::fcntl(fd, libc::F_GETFD) };
    |                                                ^^^^^^^ not found in `libc`

error[E0425]: cannot find value `FD_CLOEXEC` in crate `libc`
   --> C:\Users\admin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\close_fds-0.3.2\src\util.rs:168:37
    |
168 |     if flags >= 0 && (flags & libc::FD_CLOEXEC) != libc::FD_CLOEXEC {
    |                                     ^^^^^^^^^^ not found in `libc`

error[E0425]: cannot find value `FD_CLOEXEC` in crate `libc`
    |
168 |     if flags >= 0 && (flags & libc::FD_CLOEXEC) != libc::FD_CLOEXEC {
    |                                                          ^^^^^^^^^^ not found in `libc`

error[E0425]: cannot find function `fcntl` in crate `libc`
   --> C:\Users\admin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\close_fds-0.3.2\src\util.rs:171:19
    |
171 |             libc::fcntl(fd, libc::F_SETFD, flags | libc::FD_CLOEXEC);
    |                   ^^^^^ not found in `libc`

error[E0425]: cannot find value `F_SETFD` in crate `libc`
   --> C:\Users\admin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\close_fds-0.3.2\src\util.rs:171:35
    |
171 |             libc::fcntl(fd, libc::F_SETFD, flags | libc::FD_CLOEXEC);
    |                                   ^^^^^^^ not found in `libc`

error[E0425]: cannot find value `FD_CLOEXEC` in crate `libc`
   --> C:\Users\admin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\close_fds-0.3.2\src\util.rs:171:58
    |
171 |             libc::fcntl(fd, libc::F_SETFD, flags | libc::FD_CLOEXEC);
    |                                                          ^^^^^^^^^^ not found in `libc`

For more information about this error, try `rustc --explain E0425`.

from sshx.

ekzhang avatar ekzhang commented on June 7, 2024

Windows is not supported yet. You're welcome to help port it over. See existing issue for guidance.

from sshx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.