Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spdlog
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
spdlog
Commits
c4df94a1
Unverified
Commit
c4df94a1
authored
Aug 19, 2019
by
AMS21
Committed by
GitHub
Aug 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Wundef in os-inl.h
parent
da1d98d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
include/spdlog/details/os-inl.h
include/spdlog/details/os-inl.h
+3
-3
No files found.
include/spdlog/details/os-inl.h
View file @
c4df94a1
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
#ifdef __linux__
#ifdef __linux__
#include <sys/syscall.h> //Use gettid() syscall under linux to get thread id
#include <sys/syscall.h> //Use gettid() syscall under linux to get thread id
#elif
__FreeBSD__
#elif
defined(__FreeBSD__)
#include <sys/thr.h> //Use thr_self() syscall under FreeBSD to get thread id
#include <sys/thr.h> //Use thr_self() syscall under FreeBSD to get thread id
#endif
#endif
...
@@ -306,12 +306,12 @@ SPDLOG_INLINE size_t _thread_id() SPDLOG_NOEXCEPT
...
@@ -306,12 +306,12 @@ SPDLOG_INLINE size_t _thread_id() SPDLOG_NOEXCEPT
{
{
#ifdef _WIN32
#ifdef _WIN32
return
static_cast
<
size_t
>
(
::
GetCurrentThreadId
());
return
static_cast
<
size_t
>
(
::
GetCurrentThreadId
());
#elif
__linux__
#elif
defined(__linux__)
#if defined(__ANDROID__) && defined(__ANDROID_API__) && (__ANDROID_API__ < 21)
#if defined(__ANDROID__) && defined(__ANDROID_API__) && (__ANDROID_API__ < 21)
#define SYS_gettid __NR_gettid
#define SYS_gettid __NR_gettid
#endif
#endif
return
static_cast
<
size_t
>
(
syscall
(
SYS_gettid
));
return
static_cast
<
size_t
>
(
syscall
(
SYS_gettid
));
#elif
__FreeBSD__
#elif
defined(__FreeBSD__)
long
tid
;
long
tid
;
thr_self
(
&
tid
);
thr_self
(
&
tid
);
return
static_cast
<
size_t
>
(
tid
);
return
static_cast
<
size_t
>
(
tid
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment