Skip to content

Commit f672bb6

Browse files
authored
build: add apple tvOS support (#365)
1 parent 62c8873 commit f672bb6

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

boringtun-cli/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use std::process::exit;
1111
use tracing::Level;
1212

1313
fn check_tun_name(_v: String) -> Result<(), String> {
14-
#[cfg(any(target_os = "macos", target_os = "ios"))]
14+
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
1515
{
1616
if boringtun::device::tun::parse_utun_name(&_v).is_ok() {
1717
Ok(())

boringtun/src/device/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ pub mod drop_privileges;
99
mod integration_tests;
1010
pub mod peer;
1111

12-
#[cfg(any(target_os = "macos", target_os = "ios"))]
12+
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
1313
#[path = "kqueue.rs"]
1414
pub mod poll;
1515

1616
#[cfg(target_os = "linux")]
1717
#[path = "epoll.rs"]
1818
pub mod poll;
1919

20-
#[cfg(any(target_os = "macos", target_os = "ios"))]
20+
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
2121
#[path = "tun_darwin.rs"]
2222
pub mod tun;
2323

@@ -75,7 +75,7 @@ pub enum Error {
7575
SetSockOpt(String),
7676
#[error("Invalid tunnel name")]
7777
InvalidTunnelName,
78-
#[cfg(any(target_os = "macos", target_os = "ios"))]
78+
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
7979
#[error("{0}")]
8080
GetSockOpt(io::Error),
8181
#[error("{0}")]

boringtun/src/sleepyinstant/unix.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ use std::time::Duration;
33
use nix::sys::time::TimeSpec;
44
use nix::time::{clock_gettime, ClockId};
55

6-
#[cfg(any(target_os = "macos", target_os = "ios"))]
6+
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
77
const CLOCK_ID: ClockId = ClockId::CLOCK_MONOTONIC;
8-
#[cfg(not(any(target_os = "macos", target_os = "ios")))]
8+
#[cfg(not(any(target_os = "macos", target_os = "ios", target_os = "tvos")))]
99
const CLOCK_ID: ClockId = ClockId::CLOCK_BOOTTIME;
1010

1111
#[derive(Clone, Copy, Debug)]

0 commit comments

Comments
 (0)