After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 722526 - glib/deprecated/gthread.h error on FreeBSD
glib/deprecated/gthread.h error on FreeBSD
Product: glib
Classification: Platform
Component: gthread
Other FreeBSD
: Normal normal
: ---
Assigned To: gtkdev
Depends on:
Reported: 2014-01-19 06:49 UTC by Ting-Wei Lan
Modified: 2014-01-20 12:35 UTC
See Also:
GNOME target: ---
GNOME version: ---

#include <sys/types.h> before #include <pthread.h> (385 bytes, patch)
2014-01-19 06:49 UTC, Ting-Wei Lan
none Details | Review

Description Ting-Wei Lan 2014-01-19 06:49:34 UTC
Created attachment 266644 [details] [review]
#include <sys/types.h> before #include <pthread.h>

Using this header cause error on FreeBSD because clockid_t cannot be found. #include <sys/types.h> before #include <pthread.h> can fix this problem.
Comment 1 Matthias Clasen 2014-01-19 22:14:59 UTC
This is clearly a bug in the freebsd headers. sus says:

  Inclusion of the <pthread.h> header shall make symbols defined in the headers 
  <sched.h> and <time.h> visible.

I'll commit the workaround anyway.
Comment 2 Ting-Wei Lan 2014-01-20 09:09:28 UTC
#include <time.h> still does not work on FreeBSD. #include <sys/types.h> works.
Comment 3 Matthias Clasen 2014-01-20 12:28:34 UTC
even more broken :(