Skip to content

Commit

Permalink
Handle conditional compilation for getting TID on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
SpriteOvO committed Sep 6, 2023
1 parent c47cfc1 commit 0049e71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions spdlog/src/formatter/pattern_formatter/pattern/thread_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ use crate::{
///
/// On Linux, this pattern writes the return value of `gettid` to the output.
///
/// On macOS, this pattern writes the return value of `pthread_self` to the
/// output.
/// On macOS and iOS, this pattern writes the return value of
/// `pthread_threadid_np` to the output.
///
/// On Windows, this pattern writes the return value of `GetCurrentThreadId` to
/// the output.
Expand Down
2 changes: 1 addition & 1 deletion spdlog/src/record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ fn get_current_tid() -> u64 {
tid as u64
}

#[cfg(target_os = "macos")]
#[cfg(any(target_os = "macos", target_os = "ios"))]
#[must_use]
fn get_current_tid_inner() -> u64 {
let mut tid = 0;
Expand Down

0 comments on commit 0049e71

Please sign in to comment.