Skip to content

Commit 51e8813

Browse files
committed
Fix build on linux
1 parent 268fa29 commit 51e8813

File tree

1 file changed

+3
-3
lines changed
  • src/xtd.core.native.unix/src/xtd/native/unix

1 file changed

+3
-3
lines changed

src/xtd.core.native.unix/src/xtd/native/unix/thread.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ intmax_t thread::create(std::function<void(intmax_t)> start, intmax_t obj, int_l
2121
delete start_obj;
2222
return nullptr;
2323
}, reinterpret_cast<void*>( new std::pair<std::function<void(intmax_t)>, intmax_t> {start, obj}));
24-
if (error != 0) return reinterpret_cast<intmax_t>(PTHREAD_FAILED);
24+
if (error != 0) return static_cast<intmax_t>(PTHREAD_FAILED);
2525
return static_cast<intmax_t>(thread);
2626
}
2727

@@ -41,8 +41,8 @@ bool thread::resume(intmax_t handle) {
4141
}
4242

4343
bool thread::set_background(intmax_t handle) {
44-
if (reinterpret_cast<pthread_t>(handle) == PTHREAD_FAILED) return false;
45-
return pthread_detach(reinterpret_cast<pthread_t>(handle)) == 0;
44+
if (static_cast<pthread_t>(handle) == PTHREAD_FAILED) return false;
45+
return pthread_detach(static_cast<pthread_t>(handle)) == 0;
4646
}
4747

4848
bool thread::set_current_thread_name(const std::string& name) {

0 commit comments

Comments
 (0)