File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -168,15 +168,17 @@ cfg_if! {
168
168
attr: * mut pthread_attr_t) -> c_int;
169
169
}
170
170
} else if #[ cfg( target_os = "macos" ) ] {
171
- use libc:: { c_void, pthread_t} ;
171
+ use libc:: { c_void, pthread_t, size_t } ;
172
172
173
173
unsafe fn guess_os_morestack_stack_limit( ) -> usize {
174
- pthread_get_stackaddr_np( pthread_self( ) ) as usize
174
+ pthread_get_stackaddr_np( pthread_self( ) ) as usize -
175
+ pthread_get_stacksize_np( pthread_self( ) ) as usize
175
176
}
176
177
177
178
extern {
178
179
fn pthread_self( ) -> pthread_t;
179
180
fn pthread_get_stackaddr_np( thread: pthread_t) -> * mut c_void;
181
+ fn pthread_get_stacksize_np( thread: pthread_t) -> size_t;
180
182
}
181
183
} else {
182
184
unsafe fn guess_os_morestack_stack_limit( ) -> usize {
You can’t perform that action at this time.
0 commit comments