Fixing FreeBSD x64 build
Patch by Shane Ambler, thanks!
This commit is contained in:
@@ -33,6 +33,10 @@
|
|||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include <stdlib.h> // for NULL
|
#include <stdlib.h> // for NULL
|
||||||
|
#if defined(__FreeBSD__)
|
||||||
|
/* devel/libunwind only includes _Unwind_Backtrace if this is set */
|
||||||
|
#define _GNU_SOURCE 1
|
||||||
|
#endif
|
||||||
#include <unwind.h> // ABI defined unwinder
|
#include <unwind.h> // ABI defined unwinder
|
||||||
}
|
}
|
||||||
#include "stacktrace.h"
|
#include "stacktrace.h"
|
||||||
|
@@ -223,7 +223,7 @@ int32 GetMainThreadPid() {
|
|||||||
|
|
||||||
pid_t GetTID() {
|
pid_t GetTID() {
|
||||||
// On Linux and FreeBSD, we try to use gettid().
|
// On Linux and FreeBSD, we try to use gettid().
|
||||||
#if defined OS_LINUX || defined OS_FREEBSD || defined OS_MACOSX
|
#if defined OS_LINUX || defined OS_MACOSX
|
||||||
#ifndef __NR_gettid
|
#ifndef __NR_gettid
|
||||||
#ifdef OS_MACOSX
|
#ifdef OS_MACOSX
|
||||||
#define __NR_gettid SYS_gettid
|
#define __NR_gettid SYS_gettid
|
||||||
|
Reference in New Issue
Block a user