| Summary: | stop using deprecated mutex funcs with newer glibc versions | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Mike Frysinger <vapier> |
| Component: | thread | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 1.2 | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Attachments: | libsdl-older-mutex-funcs.patch | ||
|
Description
Mike Frysinger
2006-02-01 20:22:04 UTC
Created attachment 64 [details]
libsdl-older-mutex-funcs.patch
(In reply to comment #0) > older versions of glibc used pthread_mutexattr_setkind_np() while nowadays it's > deprecated in favor of pthread_mutexattr_settype() ... atm, SDL_sysmutex.c > always uses the deprecated one on linux systems > > patch attached will enable use of the newer func for glibc-2.3.x+ I have glibc-2.3.5, and PTHREAD_MUTEX_RECURSIVE is only defined if __USE_UNIX98 is defined, which it isn't by default. However, it's not a bad idea to use it when available, so I'm writing a configure test to do the right thing. Thanks! (In reply to comment #2) > I have glibc-2.3.5, and PTHREAD_MUTEX_RECURSIVE is only defined if __USE_UNIX98 > is defined, which it isn't by default. You have to define _GNU_SOURCE to get the __USE_UNIX98 API calls. I'm setting this up in configure.in, thanks! |