Comments (3)
This is likely indicative of either your compiler or a dependency needs to be updated, but I don't think this is an issue with this crate.
from socket2.
Found it. Was pulling in and aged cfg-if 0.1.2. Thanks Alex!
from socket2.
I've had the same issue when I tried to publish my crate which has a dependency socket2-0.3.11
with Rust 1.38. But with Rust 1.36 is OK.
Compile output:
error: cannot find macro `__cfg_if_items` in this scope
--> /Users/crocus/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.11/src/sys/unix.rs:27:1
|
27 | / cfg_if::cfg_if! {
28 | | if #[cfg(any(target_os = "dragonfly", target_os = "freebsd",
29 | | target_os = "ios", target_os = "macos",
30 | | target_os = "openbsd", target_os = "netbsd",
... |
37 | | }
38 | | }
| |_^
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error: cannot find macro `__cfg_if_items` in this scope
--> /Users/crocus/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.11/src/sys/unix.rs:40:1
|
40 | / cfg_if::cfg_if! {
41 | | if #[cfg(any(target_os = "linux", target_os = "android",
42 | | target_os = "dragonfly", target_os = "freebsd",
43 | | target_os = "openbsd", target_os = "netbsd",
... |
48 | | }
49 | | }
| |_^
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error: cannot find macro `__cfg_if_items` in this scope
--> /Users/crocus/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.11/src/sys/unix.rs:51:1
|
51 | / cfg_if::cfg_if! {
52 | | if #[cfg(any(target_os = "macos", target_os = "ios"))] {
53 | | use libc::TCP_KEEPALIVE as KEEPALIVE_OPTION;
54 | | } else if #[cfg(any(target_os = "openbsd", target_os = "netbsd", target_os = "haiku"))] {
... |
58 | | }
59 | | }
| |_^
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error[E0425]: cannot find value `MSG_NOSIGNAL` in this scope
--> /Users/crocus/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.11/src/sys/unix.rs:408:21
|
408 | MSG_NOSIGNAL,
| ^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find value `MSG_NOSIGNAL` in this scope
--> /Users/crocus/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.11/src/sys/unix.rs:422:21
|
422 | MSG_NOSIGNAL,
| ^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find value `IPV6_ADD_MEMBERSHIP` in this scope
--> /Users/crocus/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.11/src/sys/unix.rs:628:54
|
628 | unsafe { self.setsockopt(libc::IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, mreq) }
| ^^^^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find value `IPV6_DROP_MEMBERSHIP` in this scope
--> /Users/crocus/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.11/src/sys/unix.rs:647:54
|
647 | unsafe { self.setsockopt(libc::IPPROTO_IPV6, IPV6_DROP_MEMBERSHIP, mreq) }
| ^^^^^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find value `KEEPALIVE_OPTION` in this scope
--> /Users/crocus/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.11/src/sys/unix.rs:707:66
|
707 | let secs: c_int = self.getsockopt(libc::IPPROTO_TCP, KEEPALIVE_OPTION)?;
| ^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find value `KEEPALIVE_OPTION` in this scope
--> /Users/crocus/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.11/src/sys/unix.rs:721:52
|
721 | self.setsockopt(libc::IPPROTO_TCP, KEEPALIVE_OPTION, dur.as_secs() as c_int)?;
| ^^^^^^^^^^^^^^^^ not found in this scope
error: aborting due to 9 previous errors
For more information about this error, try `rustc --explain E0425`.
error: could not compile `socket2`.
from socket2.
Related Issues (20)
- Add CI support for ESP-IDF
- msghdr as a private field in MsgHdr/MsgMutHdr HOT 2
- Set Socket interface using interface index HOT 1
- What happened to the `RAW` socket type? HOT 1
- Question: Possible to support architectures that only provide the `std::net` interface (and only TCP)? HOT 4
- Windows: `sa_family_t` should use `ADDRESS_FAMILY` from `windows-sys` HOT 5
- nonblocking connect HOT 6
- Set `ss_len` when creating `SockAddr` from std HOT 1
- Why cannot find WASStartup and WSACleanup in source code? HOT 7
- bind_device succeeds, but subsequent sends fail with no such device or address. HOT 5
- QUESTION: How to special `laddr` when dialing connection? HOT 3
- Android support HOT 3
- don'tassign8080 port
- Currently socket2 has no way to set the DF bit on packets. The attached patch adds it. HOT 3
- Error: BoxSend(Os { code: 98, kind: AddrInUse, message: "Address already in use" }) HOT 2
- How to read EventExtra from the event? HOT 2
- socket() always fails on WSL1 due to unsupported SOCK_CLOEXEC flag HOT 5
- Support for {recv,send}mmsg HOT 2
- New release HOT 1
- socket error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from socket2.