Skip to content

Commit 20440dd

Browse files
committed
:feat: support compile with lower glibc version
1 parent 8f68ff9 commit 20440dd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/test.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
*/
66
#include "../code/log/log.h"
77
#include "../code/pool/threadpool.h"
8+
#include <features.h>
9+
10+
#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 30
11+
#include <sys/syscall.h>
12+
#define gettid() syscall(SYS_gettid)
13+
#endif
814

915
void TestLog() {
1016
int cnt = 0, level = 0;

0 commit comments

Comments
 (0)