Skip to content

Commit f888cb5

Browse files
committed
android: Switch from glob exports to select imports
Match Apple and Linux to make it more clear what headers we want to map. Additionally, rename to `bionic_libc` since we may have others in the future (e.g. `bionic_uapi`). (backport <#4770>) (cherry picked from commit 0486b80)
1 parent 8136e2c commit f888cb5

File tree

7 files changed

+18
-9
lines changed

7 files changed

+18
-9
lines changed

src/new/bionic/mod.rs

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/new/bionic/sys/mod.rs

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/new/bionic_libc/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//! This directory maps to `bionic/libc/include` in the Android source.
2+
//!
3+
//! <https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/include/>
4+
5+
pub(crate) mod sys;

src/new/bionic_libc/sys/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//! Directory: `sys/`
2+
3+
pub(crate) mod socket;

src/new/bionic/sys/socket.rs renamed to src/new/bionic_libc/sys/socket.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Header: `bionic/libc/include/sys/socket.h`
1+
//! Header: `sys/socket.h`
22
33
use crate::prelude::*;
44

src/new/mod.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ cfg_if! {
2020
mod linux_uapi;
2121
pub(crate) use linux_uapi::*;
2222
} else if #[cfg(target_os = "android")] {
23-
mod bionic;
24-
pub use bionic::*;
23+
mod bionic_libc;
24+
pub(crate) use bionic_libc::*;
2525
} else if #[cfg(target_vendor = "apple")] {
2626
mod apple;
2727
pub(crate) use apple::*;
@@ -30,7 +30,9 @@ cfg_if! {
3030

3131
// Headers we export
3232
cfg_if! {
33-
if #[cfg(target_os = "linux")] {
33+
if #[cfg(target_os = "android")] {
34+
pub use sys::socket::*;
35+
} else if #[cfg(target_os = "linux")] {
3436
pub use linux::can::bcm::*;
3537
pub use linux::can::j1939::*;
3638
pub use linux::can::raw::*;

triagebot.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ trigger_files = [
3434
new_pr = true
3535

3636
[autolabel."O-android"]
37-
trigger_files = ["src/unix/linux_like/android"]
37+
trigger_files = [
38+
"src/new/bionic_libc",
39+
"src/unix/linux_like/android",
40+
]
3841

3942
[autolabel."O-arm"]
4043
trigger_files = [

0 commit comments

Comments
 (0)