Skip to content

Commit c47a8bb

Browse files
committed
stack_overflow: get_stackp using MAP_STACK flag on dragonflybsd too.
1 parent e2068cd commit c47a8bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/std/src/sys/unix/stack_overflow.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ mod imp {
134134
// OpenBSD requires this flag for stack mapping
135135
// otherwise the said mapping will fail as a no-op on most systems
136136
// and has a different meaning on FreeBSD
137-
#[cfg(any(target_os = "openbsd", target_os = "netbsd", target_os = "linux",))]
137+
#[cfg(any(target_os = "openbsd", target_os = "netbsd", target_os = "linux", target_os = "dragonfly",))]
138138
let flags = MAP_PRIVATE | MAP_ANON | libc::MAP_STACK;
139-
#[cfg(not(any(target_os = "openbsd", target_os = "netbsd", target_os = "linux",)))]
139+
#[cfg(not(any(target_os = "openbsd", target_os = "netbsd", target_os = "linux", target_os = "dragonfly",)))]
140140
let flags = MAP_PRIVATE | MAP_ANON;
141141
let stackp =
142142
mmap64(ptr::null_mut(), SIGSTKSZ + page_size(), PROT_READ | PROT_WRITE, flags, -1, 0);

0 commit comments

Comments
 (0)