fix/compile: does not compile under fedora 31, extern + static definitions of gettid()

This commit is contained in:
Bernhard Schuster 2020-04-09 10:28:21 +02:00
parent b8625be5ba
commit f7b60a68d3
No known key found for this signature in database
GPG Key ID: EF08D41352004815
3 changed files with 1 additions and 19 deletions

View File

@ -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

View File

@ -3,9 +3,9 @@
#include <string.h>
#include <time.h>
#include <unistd.h>
#include "log.h"
#include "thread.h"
class timer {
public:

View File

@ -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;