Age | Commit message (Collapse) | Author |
|
expect into proper try handling), needs testing still
|
|
|
|
Add FcntlArg::F_FULLFSYNC
https://developer.apple.com/library/ios/documentation/System/Conceptual/ManPages_iPhoneOS/man2/fsync.2.html
|
|
https://developer.apple.com/library/ios/documentation/System/Conceptual/ManPages_iPhoneOS/man2/fsync.2.html
|
|
|
|
On Linux, the cmsg_len field of struct cmsghdr has type size_t, but it
has size socklen_t on POSIX-compliant operating systems. So on
POSIX-compliant 64-bit operating systems, struct cmsghdr has padding
gaps that aren't present on Linux. Most of the issues fixed by this
commit related to those gaps.
src/sys/socket/ffi.rs
Fix the type of the cmsg_data field so the struct layout will be
correct.
src/sys/socket/mod.rs
In CmsgIterator.next, only return a single file descriptor.
sendmsg(2) can only stuff a single file descriptor into each
cmsg.
In cmsg_align, fix the rounding calculation, and eliminate a
division instruction.
Add a missing cmsg_align call in ControlMessage.len
In ControlMessage.encode_into, add any necessary padding bytes
between the cmsghdr and the data.
In sendmsg, fix some len<->capacity confusion.
|
|
Rules for generic types were located above rules for specific types, so the
rules for specific types never got matched. This caused the
sys::socket::sockopt::test::can_get_listen_on_tcp_socket test to fail on
FreeBSD. The solution is to put all of the generic rules at the bottom.
|
|
|
|
|
|
|
|
This reverts commit 012c6623c9c50aca91b81e6d30800613f515f898.
|
|
|
|
|
|
|
|
|
|
|
|
Force using the constants even on x86 where they do not fit into isize (c_int)
|
|
|
|
|
|
This commit revamps to eventfd to follow nix conventions:
- drop in-crate FFI definitions
- rename EventFdFlag to EfdFlags
Additionally, it changes the initval argument to be a libc::c_uint,
matching the actual type.
|
|
Add missing wait flag WUNTRACED for non-Linux systems
My understanding is that this flag is required by POSIX, so all systems should allow for it
|
|
|
|
|
|
Provide accessors to sigmask of UContext.
|
|
Signal enum
This is work in progress. I post this pull request as a request for discussion. I mark the lines I have doubts or ideas about.
Ignore the first commit. It is the same as PR #361, which I wanted to base this change off.
|
|
|
|
Added lseek and seek64
I have added lseek and seek64 to unistd, the last one targeting Linux/Android only. I wasn't sure where to place the Whence enum, or if it's a nice of doing, I am quite fresh to Rust.
|
|
llseek and lseek64
impl Whence
fixed formatting
awful typo when refactoring
no llseek
wrong test name
using off64_t
got rid of offset
Added SeekHole/Data; formatted test; SeekCur/Set/End use libc constants
|
|
|
|
|
|
This prevents us breaking builds under newer Rust versions with
additional warnings.
|
|
|
|
Add missing signals.
In preparation of turning them into an enumeration.
|
|
|
|
|
|
Add SO_ORIGINAL_DST
In Linux, the SO_ORIGINAL_DST socket option can be used to get the original destination, which can be needed if the connection is translated by a NAT, i.e. iptables. In C, this information can be obtained by ``getsockopt(fd, SOL_IP, SO_ORIGINAL_DST, &remote, &remote_len)`` and returns a ``sockaddr_in`` struct. I've added a binding for this option.
Thanks!
|
|
|
|
Add support for converting AF_NETLINK sockaddr_nl addresses to
Sockaddr::Netlink(). This lets socket::recvmsg() work on netlink
sockets.
|
|
Use Void in exec return type
Indicates that these methods cannot return successfully. This does introduce a new dependency; an empty enum could be used instead but then you would lose the convenience `unreachable` methods exposed by the `void` crate, and standardizing on one type, etc...
|
|
fcntl: Use bindings from libc instead of our own
**Un-finished** and looking for help. As #264 was tagged "mentor, good first bug"
Ref #264
I couldn't find `F_GET_SEALS`, or `F_ADD_SEALS` in libc.
Is this a case where I should be making a PR over there? I'm not sure where exactly to address it in libc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Cast function item to function pointer in order to appease compiler.
This is necessary because of compiler changes. For further information
look at rust-lang/rust#19925.
This solves #346.
I know that there are other problems with the affected function. We are thinking about how to best pass the arguments to the function and we don't want to define the ffi's ourselves. However, I would like to get the warning out of our tree as soon as possible. We do not need to wait for our polish.
|
|
|
|
This is necessary because of compiler changes. For further information
look at rust-lang/rust#19925.
|