Skip to content

Commit 49283c9

Browse files
authored
Add apple tvos support (#2169)
1 parent 0ff4621 commit 49283c9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+575
-788
lines changed

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ caps = "0.5.3"
8383
[target.'cfg(target_os = "freebsd")'.dev-dependencies]
8484
sysctl = "0.4"
8585

86+
[build-dependencies]
87+
cfg_aliases = "0.1.1"
88+
8689
[[test]]
8790
name = "test"
8891
path = "test/test.rs"

build.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
use cfg_aliases::cfg_aliases;
2+
3+
fn main() {
4+
cfg_aliases! {
5+
ios: { target_os = "ios" },
6+
macos: { target_os = "macos" },
7+
watchos: { target_os = "watchos" },
8+
tvos: { target_os = "tvos" },
9+
apple_targets: { any(ios, macos, watchos, tvos) },
10+
}
11+
}

src/dir.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,9 @@ impl Entry {
230230
target_os = "fuchsia",
231231
target_os = "haiku",
232232
target_os = "illumos",
233-
target_os = "ios",
233+
apple_targets,
234234
target_os = "l4re",
235235
target_os = "linux",
236-
target_os = "macos",
237236
target_os = "solaris"))] {
238237
self.0.d_ino as u64
239238
} else {

0 commit comments

Comments
 (0)