Skip to content

Commit 825dd41

Browse files
committed
fix build error
1 parent 476d469 commit 825dd41

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/mimalloc/atomic.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,8 @@ static inline void mi_lock_done(mi_lock_t* lock) {
457457

458458
#elif defined(MI_USE_PTHREADS)
459459

460+
void _mi_error_message(int err, const char* fmt, ...);
461+
460462
#define mi_lock_t pthread_mutex_t
461463

462464
static inline bool mi_lock_try_acquire(mi_lock_t* lock) {
@@ -465,7 +467,7 @@ static inline bool mi_lock_try_acquire(mi_lock_t* lock) {
465467
static inline void mi_lock_acquire(mi_lock_t* lock) {
466468
const int err = pthread_mutex_lock(lock);
467469
if (err != 0) {
468-
mi_error_message(EFAULT, "internal error: lock cannot be acquired\n");
470+
_mi_error_message(err, "internal error: lock cannot be acquired\n");
469471
}
470472
}
471473
static inline void mi_lock_release(mi_lock_t* lock) {

0 commit comments

Comments
 (0)