mirror of
https://github.com/plasma-umass/coz.git
synced 2024-09-11 04:55:25 +03:00
fix/compile: does not compile under fedora 31, extern + static definitions of gettid()
This commit is contained in:
parent
b8625be5ba
commit
f7b60a68d3
@ -1,17 +0,0 @@
|
||||
#if !defined(CCUTIL_THREAD_H)
|
||||
#define CCUTIL_THREAD_H
|
||||
|
||||
// gettid() is provided by glibc since version 2.30
|
||||
// only create our own implementation for older glibc versions
|
||||
#include <features.h>
|
||||
#if !__GLIBC_PREREQ(2,30)
|
||||
|
||||
#include <sys/syscall.h>
|
||||
|
||||
static inline pid_t gettid() {
|
||||
return syscall(__NR_gettid);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
@ -3,9 +3,9 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "log.h"
|
||||
#include "thread.h"
|
||||
|
||||
class timer {
|
||||
public:
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
#include "ccutil/log.h"
|
||||
#include "ccutil/spinlock.h"
|
||||
#include "ccutil/thread.h"
|
||||
#include "ccutil/wrapped_array.h"
|
||||
|
||||
using ccutil::wrapped_array;
|
||||
|
Loading…
Reference in New Issue
Block a user