Skip to content

Commit c8f4055

Browse files
committed
Handle conditional compilation for getting TID on iOS
1 parent eca9ed6 commit c8f4055

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

spdlog/src/formatter/pattern_formatter/pattern/thread_id.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ use crate::{
1212
///
1313
/// On Linux, this pattern writes the return value of `gettid` to the output.
1414
///
15-
/// On macOS, this pattern writes the return value of `pthread_self` to the
16-
/// output.
15+
/// On macOS and iOS, this pattern writes the return value of
16+
/// `pthread_threadid_np` to the output.
1717
///
1818
/// On Windows, this pattern writes the return value of `GetCurrentThreadId` to
1919
/// the output.

spdlog/src/record.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ fn get_current_tid() -> u64 {
269269
tid as u64
270270
}
271271

272-
#[cfg(target_os = "macos")]
272+
#[cfg(any(target_os = "macos", target_os = "ios"))]
273273
#[must_use]
274274
fn get_current_tid_inner() -> u64 {
275275
let mut tid = 0;

0 commit comments

Comments
 (0)