Skip to content

Commit

Permalink
Fix gettid breaking compatibility with glibc <2.30 (#7372)
Browse files Browse the repository at this point in the history
  • Loading branch information
tzm41 authored Jun 4, 2021
1 parent 0ec85e6 commit 2d832bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/platform/Linux/Logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include <cinttypes>
#include <cstdio>
#include <sys/syscall.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>

namespace chip {
Expand Down Expand Up @@ -36,7 +36,7 @@ void LogV(const char * module, uint8_t category, const char * msg, va_list v)
gettimeofday(&tv, nullptr);

printf("[%" PRIu64 ".%06" PRIu64 "][%ld] CHIP:%s: ", static_cast<uint64_t>(tv.tv_sec), static_cast<uint64_t>(tv.tv_usec),
static_cast<long>(gettid()), module);
static_cast<long>(syscall(SYS_gettid)), module);
vprintf(msg, v);
printf("\n");
fflush(stdout);
Expand Down

0 comments on commit 2d832bf

Please sign in to comment.