Commit 95048129 authored by Pavol Rusnak's avatar Pavol Rusnak Committed by Damien George

unix: Fix build on arm64-darwin due to integer cast.

This fixes error: cast to smaller integer type 'int' from 'pthread_t'.
pthread_t is defined as long, not as int.
Signed-off-by: default avatarPavol Rusnak <pavol@rusnak.io>
parent e7f7094e
......@@ -126,7 +126,7 @@ void mp_thread_init(void) {
thread->next = NULL;
#if defined(__APPLE__)
snprintf(thread_signal_done_name, sizeof(thread_signal_done_name), "micropython_sem_%d", (int)thread->id);
snprintf(thread_signal_done_name, sizeof(thread_signal_done_name), "micropython_sem_%ld", (long)thread->id);
thread_signal_done_p = sem_open(thread_signal_done_name, O_CREAT | O_EXCL, 0666, 0);
#else
sem_init(&thread_signal_done, 0, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment