Fix issue on FreeBSD when building in C11 mode:
thrd_sucess is not equal to 0 on this system, so replace 0 by thrd_success
This commit is contained in:
1 parent
bf7d4eee55
commit
8846707c8b
1 file changed
+2
-2
@@ -63,7 +63,7 @@ static inline void m_mutex_init(m_mutex_t m)
|
|||||||
int rc = mtx_init(m, mtx_plain);
|
int rc = mtx_init(m, mtx_plain);
|
||||||
// Abort program in case of initialization failure
|
// Abort program in case of initialization failure
|
||||||
// There is really nothing else to do if a mutex cannot be constructed
|
// There is really nothing else to do if a mutex cannot be constructed
|
||||||
M_ASSERT_INIT (rc == 0, "mutex");
|
M_ASSERT_INIT (rc == thrd_success, "mutex");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clear the mutex (destructor) */
|
/* Clear the mutex (destructor) */
|
||||||
@@ -90,7 +90,7 @@ static inline void m_cond_init(m_cond_t c)
|
|||||||
int rc = cnd_init(c);
|
int rc = cnd_init(c);
|
||||||
// Abort program in case of initialization failure
|
// Abort program in case of initialization failure
|
||||||
// There is really nothing else to do if the object cannot be constructed
|
// There is really nothing else to do if the object cannot be constructed
|
||||||
M_ASSERT_INIT (rc == 0, "conditional variable");
|
M_ASSERT_INIT (rc == thrd_success, "conditional variable");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clear the condition variable (destructor) */
|
/* Clear the condition variable (destructor) */
|
||||||
|
|||||||
Reference in new issue
Block a user