Skip to content

Commit a5cd6b3

Browse files
committed
Use syscall(SYS_gettid) instead of gettid()
Use syscall(SYS_gettid) instead of gettid(), because gettid() can be undefined in older OSes. Signed-off-by: Lukasz Dorau <[email protected]>
1 parent 0660c56 commit a5cd6b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/utils_log.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static void util_log_internal(util_log_level_t level, int perror,
8282
pid_t tid = (pid_t)tid64;
8383
#else
8484
pid_t pid = getpid();
85-
pid_t tid = gettid();
85+
pid_t tid = syscall(SYS_gettid);
8686
#endif
8787

8888
char buffer[LOG_MAX];

0 commit comments

Comments
 (0)