Skip to content

Add Android items from "sys/system_properties.h" #2142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1438,6 +1438,7 @@ fn test_android(target: &str) {
"sys/swap.h",
"sys/syscall.h",
"sys/sysinfo.h",
"sys/system_properties.h",
"sys/time.h",
"sys/timerfd.h",
"sys/times.h",
Expand Down
6 changes: 6 additions & 0 deletions src/unix/linux_like/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2285,6 +2285,9 @@ pub const AF_VSOCK: ::c_int = 40;
pub const PF_NFC: ::c_int = AF_NFC;
pub const PF_VSOCK: ::c_int = AF_VSOCK;

// sys/system_properties.h
pub const PROP_VALUE_MAX: ::c_int = 92;

f! {
pub fn CMSG_NXTHDR(mhdr: *const msghdr,
cmsg: *const cmsghdr) -> *mut cmsghdr {
Expand Down Expand Up @@ -2709,6 +2712,9 @@ extern "C" {
pub fn android_set_abort_message(msg: *const ::c_char);

pub fn gettid() -> ::pid_t;

pub fn __system_property_set(__name: *const ::c_char, __value: *const ::c_char) -> ::c_int;
pub fn __system_property_get(__name: *const ::c_char, __value: *mut ::c_char) -> ::c_int;
}

cfg_if! {
Expand Down