about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorMichael Neumann <mneumann@ntecs.de>2014-07-29 16:44:39 +0200
committerMichael Neumann <mneumann@ntecs.de>2014-07-29 16:44:39 +0200
commit2e2f53fad210543be39f6997991abcd403533676 (patch)
tree2f20ba5f45c3e60332b2cc5509659002862b6160 /src/libstd/rt
parent72e2c7dec34bd87fab6bb15bb7d3d97269d4afd3 (diff)
downloadrust-2e2f53fad210543be39f6997991abcd403533676.tar.gz
rust-2e2f53fad210543be39f6997991abcd403533676.zip
Port Rust to DragonFlyBSD
Not included are two required patches:

* LLVM: segmented stack support for DragonFly [1]

* jemalloc: simple configure patches

[1]: http://reviews.llvm.org/D4705
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/backtrace.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstd/rt/backtrace.rs b/src/libstd/rt/backtrace.rs
index d075f9a1205..00477f8e119 100644
--- a/src/libstd/rt/backtrace.rs
+++ b/src/libstd/rt/backtrace.rs
@@ -464,11 +464,15 @@ mod imp {
         // the symbols. The libbacktrace API also states that the filename must
         // be in "permanent memory", so we copy it to a static and then use the
         // static as the pointer.
+        //
+        // FIXME: We also call self_exe_name() on DragonFly BSD. I haven't 
+        //        tested if this is required or not.
         unsafe fn init_state() -> *mut backtrace_state {
             static mut STATE: *mut backtrace_state = 0 as *mut backtrace_state;
             static mut LAST_FILENAME: [libc::c_char, ..256] = [0, ..256];
             if !STATE.is_null() { return STATE }
-            let selfname = if cfg!(target_os = "freebsd") {
+            let selfname = if cfg!(target_os = "freebsd") || 
+                              cfg!(target_os = "dragonfly") {
                 os::self_exe_name()
             } else {
                 None