mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-28 03:38:50 +08:00
mdbx-test: fix build for __ANDROID_API__ < 24
(using pthread_barrier_t
stub).
This commit is contained in:
parent
b19ebf0c2e
commit
9cf18176f0
@ -32,9 +32,15 @@
|
||||
|
||||
#if defined(__APPLE__) && (MDBX_LOCKING == MDBX_LOCKING_POSIX2001 || \
|
||||
MDBX_LOCKING == MDBX_LOCKING_POSIX2008)
|
||||
#include "darwin/pthread_barrier.c"
|
||||
#include "stub/pthread_barrier.c"
|
||||
#endif /* __APPLE__ && MDBX_LOCKING >= MDBX_LOCKING_POSIX2001 */
|
||||
|
||||
#if defined(__ANDROID_API__) && __ANDROID_API__ < 24 && \
|
||||
(MDBX_LOCKING == MDBX_LOCKING_POSIX2001 || \
|
||||
MDBX_LOCKING == MDBX_LOCKING_POSIX2008)
|
||||
#include "stub/pthread_barrier.c"
|
||||
#endif /* __ANDROID_API__ < 24 && MDBX_LOCKING >= MDBX_LOCKING_POSIX2001 */
|
||||
|
||||
#if MDBX_LOCKING == MDBX_LOCKING_SYSV
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/sem.h>
|
||||
|
@ -29,8 +29,6 @@
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
||||
int pthread_barrierattr_init(pthread_barrierattr_t *attr) {
|
||||
memset(attr, 0, sizeof(pthread_barrierattr_t));
|
||||
int m = pthread_mutexattr_init(&attr->mattr);
|
||||
@ -106,5 +104,3 @@ int pthread_barrier_wait(pthread_barrier_t *barrier) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* __APPLE__ */
|
@ -30,8 +30,6 @@
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -78,6 +76,4 @@ int pthread_barrier_wait(pthread_barrier_t *barrier);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
#endif /* PTHREAD_BARRIER_H */
|
Loading…
x
Reference in New Issue
Block a user