Fix implementation errors.

This commit is contained in:
Bartosz Taudul 2017-09-22 21:48:21 +02:00
parent bd622c304a
commit 6c1d014aa3

View File

@ -2,6 +2,7 @@
# include <windows.h>
#else
# include <pthread.h>
# include <string.h>
# include <unistd.h>
#endif
@ -58,9 +59,9 @@ void SetThreadName( std::thread& thread, const char* name )
char buf[16];
memcpy( buf, name, 15 );
buf[15] = '\0';
pthread_setname_np( thread.native_handle(), sz );
pthread_setname_np( thread.native_handle(), buf );
}
#endif
}
}
}