Skip to content

Commit 35faf66

Browse files
authored
Add support for tvOS (#64)
* Add tvos target * add tvos target * tvos * building lladdr.c when targeting tvos
1 parent 2488fe4 commit 35faf66

File tree

5 files changed

+8
-1
lines changed

5 files changed

+8
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ cc = "1.0.73"
2222
[target.'cfg(any(target_os = "android", target_os = "linux"))'.dependencies]
2323
libc = "0.2.101"
2424

25-
[target.'cfg(any(target_os = "ios", target_os = "macos", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd", target_os = "dragonfly"))'.dependencies]
25+
[target.'cfg(any(target_os = "ios", target_os = "macos", target_os = "tvos", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd", target_os = "dragonfly"))'.dependencies]
2626
libc = "0.2.101"
2727

2828
[target.'cfg(target_os = "windows")'.dependencies]

build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ fn main() {
44
use cc::Build;
55
use std::path::Path;
66
const TARGET_MACOS: &str = "macos";
7+
const TARGET_TVOS: &str = "tvos";
78
const TARGET_IOS: &str = "ios";
89
const TARGET_FREEBSD: &str = "freebsd";
910
const TARGET_OPENBSD: &str = "openbsd";
@@ -14,6 +15,7 @@ fn main() {
1415
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
1516
if [
1617
TARGET_MACOS,
18+
TARGET_TVOS,
1719
TARGET_IOS,
1820
TARGET_FREEBSD,
1921
TARGET_OPENBSD,

src/target/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ pub use linux::*;
99
#[cfg(any(
1010
target_os = "macos",
1111
target_os = "ios",
12+
target_os = "tvos",
1213
target_os = "freebsd",
1314
target_os = "openbsd",
1415
target_os = "netbsd",
@@ -19,6 +20,7 @@ mod unix;
1920
#[cfg(any(
2021
target_os = "macos",
2122
target_os = "ios",
23+
target_os = "tvos",
2224
target_os = "freebsd",
2325
target_os = "openbsd",
2426
target_os = "netbsd",

src/target/unix/ffi/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use libc::ifaddrs;
33
#[cfg(any(
44
target_os = "macos",
55
target_os = "ios",
6+
target_os = "tvos",
67
target_os = "freebsd",
78
target_os = "openbsd",
89
target_os = "netbsd",

src/utils/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ pub mod hex;
66
target_os = "linux",
77
target_os = "ios",
88
target_os = "macos",
9+
target_os = "tvos",
910
target_os = "freebsd",
1011
target_os = "openbsd",
1112
target_os = "netbsd",
@@ -21,6 +22,7 @@ pub(crate) mod ffialloc;
2122
target_os = "linux",
2223
target_os = "ios",
2324
target_os = "macos",
25+
target_os = "tvos",
2426
target_os = "freebsd",
2527
target_os = "openbsd",
2628
target_os = "netbsd",

0 commit comments

Comments
 (0)