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:
wtc%netscape.com 2002-03-20 21:06:10 +00:00
Родитель 4458993de1
Коммит 58c300d37d
2 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -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