Fixing FreeBSD x64 build

Patch by Shane Ambler, thanks!
This commit is contained in:
Sergey Sharybin
2012-01-12 19:38:08 +00:00
parent 7889905888
commit 101e8d8624
2 changed files with 5 additions and 1 deletions

View File

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

View File

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