Skip to content
Permalink
Browse files

Merge pull request #11498 from jbeich/freebsd

Fix "No backtrace available to print on this platform" on BSDs
  • Loading branch information...
hrydgard committed Oct 28, 2018
2 parents caa506b + 94c56ea commit 5ea935f4bfc8be57f095aed8894cdb9bc1799b7e
Showing with 3 additions and 1 deletion.
  1. +2 −0 CMakeLists.txt
  2. +1 −1 ext/native/base/backtrace.cpp
@@ -1073,6 +1073,8 @@ if(ANDROID)
target_link_libraries(native log EGL OpenSLES)
elseif(WIN32)
target_link_libraries(native ws2_32 winmm)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "^(DragonFly|FreeBSD|NetBSD)$")
target_link_libraries(native execinfo)
endif()
setup_target_project(native native)

@@ -1,6 +1,6 @@
#include "base/backtrace.h"

#if defined(__GLIBC__) && !defined(__UCLIBC__)
#if (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__)
#include <execinfo.h>
#include <unistd.h>

0 comments on commit 5ea935f

Please sign in to comment.
You can’t perform that action at this time.