Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Mar 2012 19:24:44 -0300
From:      Raphael Kubo da Costa <rakuco@FreeBSD.org>
To:        freebsd-standards@freebsd.org
Cc:        freebsd-threads@freebsd.org
Subject:   Should __clockid_t be used instead of clockid_t in pthread.h?
Message-ID:  <87haxlh7ir.fsf@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87haxlh7ir.fsf>