Should __clockid_t be used instead of clockid_t in pthread.h?
Raphael Kubo da Costa
rakuco at FreeBSD.org
Sun Mar 18 22:35:07 UTC 2012
Hi there.
I'm trying to build an unstable glib version here, and one of their
tests fails to build due to them #defining _POSIX_C_SOURCE to 0 and
then #including <pthread.h>, which produces the following error on my
8-STABLE machine:
/usr/include/pthread.h:184: error: expected declaration specifiers or '...' before 'clockid_t'
/usr/include/pthread.h:187: error: expected declaration specifiers or '...' before 'clockid_t'
/usr/include/pthread.h:203: error: expected declaration specifiers or '...' before 'clockid_t'
pthread.h gets its definition of clockid_t from time.h, but time.h only
creates the typedef if __POSIX_VISIBLE is >= 199309. Using __clockid_t
instead of clockid_t in the function prototypes works fine.
Should the prototypes be changed?
Thanks.
More information about the freebsd-standards
mailing list