--- rtloader/rtloader/CMakeLists.txt.orig	2020-05-11 15:38:36 UTC
+++ rtloader/rtloader/CMakeLists.txt
@@ -29,6 +29,12 @@ add_library(datadog-agent-rtloader SHARED
 )
 endif()
 
+## Backtrace
+if(${CMAKE_SYSTEM_NAME} STREQUAL MidnightBSD)
+  find_package(Backtrace REQUIRED)
+  target_link_libraries(datadog-agent-rtloader ${Backtrace_LIBRARIES})
+endif()
+
 set_target_properties(datadog-agent-rtloader PROPERTIES
     VERSION ${PROJECT_VERSION}
     SOVERSION 1
