forked from enlightenment/efl
eina: fix support for system requiring _XOPEN_SOURCE to use spinlock and barrier.
This commit is contained in:
parent
4225ef35e1
commit
319766f837
|
@ -19,6 +19,12 @@
|
|||
#ifndef EINA_INLINE_LOCK_POSIX_X_
|
||||
#define EINA_INLINE_LOCK_POSIX_X_
|
||||
|
||||
#ifdef _XOPEN_SOURCE
|
||||
# define EINA_XOPEN_SOURCE _XOPEN_SOURCE
|
||||
# undef _XOPEN_SOURCE
|
||||
#endif
|
||||
#define _XOPEN_SOURCE 600
|
||||
|
||||
#ifdef EINA_HAVE_POSIX_SPINLOCK
|
||||
# include <sched.h>
|
||||
#endif
|
||||
|
@ -650,4 +656,10 @@ eina_spinlock_free(Eina_Spinlock *spinlock)
|
|||
#endif
|
||||
}
|
||||
|
||||
#undef _XOPEN_SOURCE
|
||||
// This is necessary to let third party still define this macro
|
||||
#ifdef EINA_XOPEN_SOURCE
|
||||
# define _XOPEN_SOURCE EINA_XOPEN_SOURCE
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue