- Jul 01, 2018
-
-
est31 authored
Previous commit dcff1547 "libc: changes to ppc64le musl branch to support building of rust on Alpine" has removed stuff from mod.rs and added it to some submodules, but missed the aarch64 submodule. This copies the stuff that that commit added to the x86_64.rs submodule and puts it into aarch64.rs.
-
- Jun 30, 2018
-
-
bors authored
illumos header translation is wrong 02000000 should be 0x80000 I am recently getting into rust and discovered that tokio wasn't working on illumos. I traced it back to mio but ultimately the issue ended up being this value in the libc crate. It looks like the octal value isn't properly translated to the rust crate as hex. Here's a test program I was using on linux and illumos: ```rust extern crate libc; #[allow(dead_code)] const ILLUMOS_EPOLL_CLOEXEC: i32 = 0x80000; fn find_func() -> usize { unsafe { libc::dlsym(libc::RTLD_DEFAULT, "epoll_create1\0".as_ptr() as *const _) as usize } } fn main() { let addr = find_func(); #[allow(unused_variables)] let hex = format!("{:x}", addr); // I think the position changes per run on linux due to something like ASLR // so we only test on solaris for this use case #[cfg(target_os = "solaris")] assert_eq!(hex, "ffffbf7fff226fe0"); // confirmed with addrtosymstr unsafe { let f = std::mem::transmute::<usize, fn(i32) -> i32>(addr); #[cfg(target_os = "linux")] let epfd = f(libc::EPOLL_CLOEXEC); #[cfg(target_os = "solaris")] let epfd = f(ILLUMOS_EPOLL_CLOEXEC); println!("call to epoll_create1 returned: {}", epfd); } } ``` Which outputs the following: ``` # cargo run Finished dev [unoptimized + debuginfo] target(s) in 0.04s Running `target/debug/dlsym` call to epoll_create1 returned: 3 ``` Edit: typo
-
Mike Zeller authored
-
- Jun 28, 2018
-
-
bors authored
Simplify the stdbuild section Found this when encountering the code in the rustc submodule and changing the allow for the warnings to deny. * `no_std` is stable so it does not have to be listed in the `feature` attribute * `no_std` as an attribute for the crate is already implied by the `#![cfg_attr(not(feature = "use_std"), no_std)]` below * `staged_api` as an attribute gives a warning. That also matches my knowledge.
-
bors authored
Haiku: Add more IP_* and IPV6_* constants. These are used in the socket2 library.
-
bors authored
Add _SC_PHYS_PAGES on macOS
-
bors authored
libc: changes to ppc64le musl branch to support building of rust on A… …lpine This PR includes changes to the libc musl branch to include the correct defines & declarations to support powerpc64. Values that needed changes to a definition for powerpc64.rs that existed higher in the branch also resulted in a change that moved the definition down to the b32/mod.rs, b64/x86_64.rs to ensure that builds continued to work on those architectures. Verification was done building rust for both ppc64le and x86_64 on Alpine as described in the git project https://github.com/mksully22/ppc64le_alpine_rust_1.26.2
-
bors authored
Add getpid on Redox None
-
bors authored
add fdopendir on macOS Fixes #1017 I moved it up to src/unix/mod.rs, as it's specified in POSIX.1-2008 and appears to be implemented on every Unix-like system. The symbol names on macOS appear similar to those for opendir; I found them via the commands below. I tested the x86_64 version; fdopendir$INODE64 worked as expected. $ nm -arch x86_64 /usr/lib/system/libsystem_c.dylib | grep fdopendir 000000000007ea6d T _fdopendir 000000000002ba97 T _fdopendir$INODE64 $ nm -arch i386 /usr/lib/system/libsystem_c.dylib | grep fdopendir 00082d1e T _fdopendir 0002b528 T _fdopendir$INODE64$UNIX2003 00082d1e T _fdopendir$UNIX2003
-
- Jun 27, 2018
-
-
bors authored
added renamex_np, renameatx_np these function can be used to atomically swap files - added 2 macos specific functions - `renamex_np` and `renameatx_np` and two constants `RENAME_SWAP` and `RENAME_EXCL` - [macos stdio.h](https://github.com/apple/darwin-xnu/blob/0ddccd8/bsd/sys/stdio.h#L45-L48) - [docs](http://www.manpagez.com/man/2/renameatx_np/osx-10.12.3.php) - ~added linux specific `renameat2`. according to the [docs](http://man7.org/linux/man-pages/man2/rename.2.html#VERSIONS) it was added to Linux in kernel 3.15.~
-
bors authored
add net/if_arp.h definitions This is based on the contents of include/net/if_arp.h on my Linux system.
-
- Jun 20, 2018
-
-
Niels Sascha Reedijk authored
These are used in the socket2 library.
-
- Jun 18, 2018
-
-
Mike Sullivan authored
amend to add style changes amend to add style changes
-
- Jun 15, 2018
-
-
Steven Fackler authored
-
- Jun 09, 2018
-
-
jD91mZM2 authored
-
- Jun 08, 2018
-
-
est31 authored
-
Scott Lamb authored
Fixes #1017 I moved it up to src/unix/mod.rs, as it's specified in POSIX.1-2008 and appears to be implemented on every Unix-like system. The symbol names on macOS appear similar to those for opendir; I found them via the commands below. I tested the x86_64 version; fdopendir$INODE64 worked as expected. $ nm -arch x86_64 /usr/lib/system/libsystem_c.dylib | grep fdopendir 000000000007ea6d T _fdopendir 000000000002ba97 T _fdopendir$INODE64 $ nm -arch i386 /usr/lib/system/libsystem_c.dylib | grep fdopendir 00082d1e T _fdopendir 0002b528 T _fdopendir$INODE64$UNIX2003 00082d1e T _fdopendir$UNIX2003
-
- Jun 04, 2018
-
-
debris authored
-
debris authored
-
Andrew Cann authored
-
- Jun 01, 2018
-
-
bors authored
Add some termios constants for sparc64
-
Bryant Mairs authored
-
bors authored
Bump version to 0.2.42 Closes https://github.com/rust-lang/libc/issues/1011
-
bors authored
make dox::mem::size_of a const fn
-
bors authored
add more built-in traits to dox.rs Add/fix bitwise operation traits in dox.rs
-
bors authored
Fix sparc64 builds Partially fixes #987.
-
bors authored
add rtentry
-
Jeremy Soller authored
-
bors authored
Add `gethostname` support to Redox module We need this for hostname support in Ion shell.
-
Andrew Cann authored
-
Andrew Cann authored
-
stratact authored
-
Andrew Cann authored
-
Andrew Cann authored
-
Andrew Cann authored
-
Andrew Cann authored
-
Andrew Cann authored
-
Andrew Cann authored
-
Andrew Cann authored
-
Andrew Cann authored
-