| Age | Commit message (Collapse) | Author | Lines |
|
std/tests: disable ancillary tests on freebsd since the feature itsel…
…f is.
|
|
|
|
|
|
Make std tests pass on newer Android
Newer versions of Android forbid the creation of hardlinks as well as Unix domain sockets in the /data filesystem via SELinux rules, which causes several tests depending on this behavior to fail. So let's skip these tests on Android if we see an EACCES from one of these syscalls. To achieve this, introduce a macro with the horrible name of or_panic_or_skip_on_android_eacces (better suggestions welcome) which skips (returns from) the test if an EACCES return value is seen on Android.
|
|
|
|
Fix documentation build on FreeBSD
After the socket ancillary data implementation was introduced, the documentation build was broken on FreeBSD hosts, add the same workaround as for the existing implementations.
Fixes the doc build after #91793
|
|
It fixes the following error:
error[E0412]: cannot find type `sockcred2` in module `libc`
--> library/std/src/os/unix/net/ancillary.rs:211:29
|
211 | pub struct SocketCred(libc::sockcred2);
| ^^^^^^^^^ not found in `libc`
|
|
After the socket ancillary data implementation was introduced, the
build was broken on FreeBSD, add the same workaround as for the
existing implementations.
|
|
|
|
introducing new build config as well.
|
|
Fixes https://github.com/rust-lang/rust/issues/85410
|
|
Newer versions of Android forbid the creation of hardlinks as well as
Unix domain sockets in the /data filesystem via SELinux rules, which
causes several tests depending on this behavior to fail. So let's
skip these tests on Android with an #[ignore] directive.
|
|
Co-authored-by: gh-tr <troach@qnx.com>
|
|
|
|
|
|
Remove manual <[u8]>::escape_ascii
`@rustbot` label: +C-cleanup
|
|
socket `set_mark` addition.
to be able to set a marker/id on the socket for network filtering
(iptables/ipfw here) purpose.
|
|
net listen backlog update, follow-up from #97963.
FreeBSD and using system limit instead for others.
|
|
FreeBSD and using system limit instead for others.
|
|
Replace most uses of `pointer::offset` with `add` and `sub`
As PR title says, it replaces `pointer::offset` in compiler and standard library with `pointer::add` and `pointer::sub`. This generally makes code cleaner, easier to grasp and removes (or, well, hides) integer casts.
This is generally trivially correct, `.offset(-constant)` is just `.sub(constant)`, `.offset(usized as isize)` is just `.add(usized)`, etc. However in some cases we need to be careful with signs of things.
r? ````@scottmcm````
_split off from #100746_
|
|
|
|
net listen backlog set to negative on Linux.
it will be 4076 (from 5.4) or 128.
|
|
|
|
stdlib support for Apple WatchOS
This is a follow-up to https://github.com/rust-lang/rust/pull/95243 (Add Apple WatchOS compiler targets) that adds stdlib support for Apple WatchOS.
`@deg4uss3r`
`@nagisa`
|
|
|
|
|
|
|
|
|
|
to be able to set a marker/id on the socket for network filtering
(iptables/ipfw here) purpose.
|
|
|
|
Implement stabilization of [I/O safety], aka `#[feature(io_safety)]`.
Fixes #87074.
[I/O safety]: https://github.com/rust-lang/rfcs/blob/master/text/3128-io-safety.md
|
|
it will be 4076 (from 5.4) or 128.
|
|
|
|
|
|
|
|
|
|
This largely makes the stdlib conform to strict provenance on Ubuntu.
Some hairier things have been left alone for now.
|
|
Rename unix::net::SocketAddr::from_path to from_pathname and stabilize it
Stabilizes `unix_socket_creation`.
Closes https://github.com/rust-lang/rust/issues/93423
r? `@m-ou-se`
|
|
This updates the standard library's documentation to use the new syntax. The
documentation is worthwhile to update as it should be more idiomatic
(particularly for features like this, which are nice for users to get acquainted
with). The general codebase is likely more hassle than benefit to update: it'll
hurt git blame, and generally updates can be done by folks updating the code if
(and when) that makes things more readable with the new format.
A few places in the compiler and library code are updated (mostly just due to
already having been done when this commit was first authored).
|
|
|
|
Matching SocketAddr::as_pathname.
|
|
|
|
|
|
|
|
The creation of libc::sockaddr_un is a safe operation, no need for it to
be unsafe.
This also uses the more performant copy_nonoverlapping instead of an
iterator.
|
|
And change it to disallow NULL bytes.
|
|
Creates a new SocketAddr from a path, supports both regular paths and
abstract namespaces.
|
|
|
|
socket ancillary data implementation for dragonflybsd.
|
|
Implement most of RFC 2930, providing the ReadBuf abstraction
This replaces the `Initializer` abstraction for permitting reading into uninitialized buffers, closing #42788.
This leaves several APIs described in the RFC out of scope for the initial implementation:
* read_buf_vectored
* `ReadBufs`
Closes #42788, by removing the relevant APIs.
|