File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -143,8 +143,8 @@ impl Thread {
143143 pub fn set_name ( name : & CStr ) {
144144 unsafe {
145145 cfg_if:: cfg_if! {
146- if #[ cfg( target_os = "linux" ) ] {
147- // Linux limits the allowed length of the name.
146+ if #[ cfg( any ( target_os = "linux" , target_os = "cygwin" ) ) ] {
147+ // Linux and Cygwin limits the allowed length of the name.
148148 const TASK_COMM_LEN : usize = 16 ;
149149 let name = truncate_cstr:: <{ TASK_COMM_LEN } >( name) ;
150150 } else {
@@ -346,6 +346,7 @@ impl Drop for Thread {
346346 target_os = "solaris" ,
347347 target_os = "illumos" ,
348348 target_os = "vxworks" ,
349+ target_os = "cygwin" ,
349350 target_vendor = "apple" ,
350351) ) ]
351352fn truncate_cstr < const MAX_WITH_NUL : usize > ( cstr : & CStr ) -> [ libc:: c_char ; MAX_WITH_NUL ] {
You can’t perform that action at this time.
0 commit comments