зеркало из https://github.com/mozilla/pjs.git
Bugzilla bug 132089: use the UNIX98 pthread_mutexattr_settype function.
Add -D_XOPEN_SOURCE=500 to enable the UNIX98 compilation environment.
This commit is contained in:
Родитель
d307ec9fc2
Коммит
a5d7e5a2e9
|
@ -63,6 +63,11 @@ INCLUDES = -I$(dist_includedir) -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/incl
|
|||
|
||||
DEFINES += -D_NSPR_BUILD_
|
||||
|
||||
ifeq ($(OS_ARCH),Linux)
|
||||
# for pthread_mutexattr_settype
|
||||
DEFINES += -D_XOPEN_SOURCE=500
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
export:: $(TARGETS)
|
||||
|
|
|
@ -73,7 +73,7 @@ void _PR_InitLocks(void)
|
|||
|
||||
#ifdef LINUX
|
||||
#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
|
||||
rv = pthread_mutexattr_setkind_np(&_pt_mattr, PTHREAD_MUTEX_ADAPTIVE_NP);
|
||||
rv = pthread_mutexattr_settype(&_pt_mattr, PTHREAD_MUTEX_ADAPTIVE_NP);
|
||||
PR_ASSERT(0 == rv);
|
||||
#endif
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче