mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 15:28:39 +09:00
Fix build errors with newer glibc versions
This commit is contained in:
parent
12fba36d6e
commit
12097d40a2
2 changed files with 4 additions and 14 deletions
|
|
@ -20,22 +20,16 @@
|
|||
|
||||
#include <stdarg.h>
|
||||
|
||||
// We need a definition of gettid(), but glibc doesn't provide a
|
||||
// We need a definition of gettid(), but older glibc versions don't provide a
|
||||
// wrapper for it.
|
||||
#if defined(__GLIBC__)
|
||||
#include <unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
static inline pid_t gettid()
|
||||
{
|
||||
return (pid_t) syscall(SYS_gettid);
|
||||
}
|
||||
#define gettid() static_cast<pid_t>(syscall(SYS_gettid))
|
||||
#elif defined(XP_MACOSX)
|
||||
#include <unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
static inline pid_t gettid()
|
||||
{
|
||||
return (pid_t) syscall(SYS_thread_selfid);
|
||||
}
|
||||
#define gettid() static_cast<pid_t>(syscall(SYS_thread_selfid))
|
||||
#elif defined(LINUX)
|
||||
#include <sys/types.h>
|
||||
pid_t gettid();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue