Skip to content

Commit 9504812

Browse files
prusnakdpgeorge
authored andcommitted
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: Pavol Rusnak <[email protected]>
1 parent e7f7094 commit 9504812

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ports/unix/mpthreadport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void mp_thread_init(void) {
126126
thread->next = NULL;
127127

128128
#if defined(__APPLE__)
129-
snprintf(thread_signal_done_name, sizeof(thread_signal_done_name), "micropython_sem_%d", (int)thread->id);
129+
snprintf(thread_signal_done_name, sizeof(thread_signal_done_name), "micropython_sem_%ld", (long)thread->id);
130130
thread_signal_done_p = sem_open(thread_signal_done_name, O_CREAT | O_EXCL, 0666, 0);
131131
#else
132132
sem_init(&thread_signal_done, 0, 0);

0 commit comments

Comments
 (0)