Prototype warning for clock_nanosleep()

Gedare Bloom gedare at rtems.org
Wed Nov 9 20:49:48 UTC 2016


On Wed, Nov 9, 2016 at 3:12 PM, Joel Sherrill <joel at rtems.org> wrote:
> On Nov 9, 2016 2:05 PM, "Gedare Bloom" <gedare at rtems.org> wrote:
>>
>> This is/should be based on the definition of _POSIX_CLOCK_SELECTION
>> and we get this from newlib/libc/include/sys/features.h as of commit
>> 9a80679aae9098aa189f7ea8ce7892e2c092f3be in newlib.git. If there is a
>> warning, then probably rsb is not getting a new enough newlib for it.
>
> Yep. Saw that and thought a POSIX_C_SOURCE define would trip it but it
> didn't.
>
> We are at newlib-2.4.0.20160527-1. There is a 20160923.
>
> Do we need to upgrade newlib?
>
Yes.

> And .. did we get resolution on my patch to upgrade binutils?
>

Chris asked for testing, and Sebastian said to just make sure it
builds on all targets.

> --joel
>
>
>> On Wed, Nov 9, 2016 at 2:10 PM, Joel Sherrill <joel at rtems.org> wrote:
>> > Hi
>> >
>> > In a build sweep, I noticed that every use of clock_nanosleep()
>> > has a warning for it not being defined. I don't seem to be able
>> > to find the magic to turn on the prototype in time.h. Does
>> > anyone see what needs to be done?
>> >
>> > ==================
>> > #define _POSIX_C_SOURCE 200112L
>> >
>> > #include <time.h>
>> >
>> > void f(void)
>> > {
>> >   int rc;
>> >
>> >   rc = clock_nanosleep();
>> > }
>> > ==================
>> >
>> > Thanks.
>> >
>> > --joel
>> >
>> > _______________________________________________
>> > devel mailing list
>> > devel at rtems.org
>> > http://lists.rtems.org/mailman/listinfo/devel



More information about the devel mailing list