Skip to content

Commit b80b32b

Browse files
committed
Auto merge of #2142 - GuillaumeGomez:add-android-items, r=JohnTitor
Add Android items from "sys/system_properties.h" It adds the following items: * __system_property_set * __system_property_get * PROP_VALUE_MAX
2 parents 3b185ef + 73200ce commit b80b32b

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

libc-test/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,6 +1438,7 @@ fn test_android(target: &str) {
14381438
"sys/swap.h",
14391439
"sys/syscall.h",
14401440
"sys/sysinfo.h",
1441+
"sys/system_properties.h",
14411442
"sys/time.h",
14421443
"sys/timerfd.h",
14431444
"sys/times.h",

src/unix/linux_like/android/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2285,6 +2285,9 @@ pub const AF_VSOCK: ::c_int = 40;
22852285
pub const PF_NFC: ::c_int = AF_NFC;
22862286
pub const PF_VSOCK: ::c_int = AF_VSOCK;
22872287

2288+
// sys/system_properties.h
2289+
pub const PROP_VALUE_MAX: ::c_int = 92;
2290+
22882291
f! {
22892292
pub fn CMSG_NXTHDR(mhdr: *const msghdr,
22902293
cmsg: *const cmsghdr) -> *mut cmsghdr {
@@ -2709,6 +2712,9 @@ extern "C" {
27092712
pub fn android_set_abort_message(msg: *const ::c_char);
27102713

27112714
pub fn gettid() -> ::pid_t;
2715+
2716+
pub fn __system_property_set(__name: *const ::c_char, __value: *const ::c_char) -> ::c_int;
2717+
pub fn __system_property_get(__name: *const ::c_char, __value: *mut ::c_char) -> ::c_int;
27122718
}
27132719

27142720
cfg_if! {

0 commit comments

Comments
 (0)