Linux: Fix a major regression in threads_posix.c
authorPete Batard <pete@akeo.ie>
Wed, 6 Jun 2012 09:53:43 +0000 (10:53 +0100)
committerPete Batard <pete@akeo.ie>
Wed, 6 Jun 2012 09:53:43 +0000 (10:53 +0100)
commitdd06d6004cc3f9228bbc6886b91aa53ae17afe50
tree50099a8a927c724971f556a3f502c30a5c23b20f
parent0c089c7a1466cfad947bb8ddad69d52de76fb698
Linux: Fix a major regression in threads_posix.c

* On some Linux platforms, libusbx compilation breaks with:
  error: implicit declaration of function ‘pthread_mutexattr_settype’
* This regression, introduced in 463dda06db5da5de0eab32820c7af60605625afe,
  is due to pthread.h needing __USE_UNIX98, which is tied to _XOPEN_SOURCE
  or _GNU_SOURCE being correctly defined, and which the inclusion of
  <unistd.h> before the _XOPEN_SOURCE override modified
* As _GNU_LINUX ensures the definition of __USE_UNIX98 and we require it
  for syscalls, we now only define _GNU_SOURCE for Linux.
libusb/os/threads_posix.c
libusb/version_nano.h