Bug#314435: libc6-dev: struct timespec and nanosleep() not available with -std=c99
to, 2005-06-16 kello 10:47 +0200, Baurzhan Ismagulov kirjoitti:
> #include <time.h>
>
> int main(void)
> {
> struct timespec a;
> nanosleep(&a, &a);
> return 0;
> }
>
> Compilation with "gcc -Wall -g -std=c99" produces the following errors:
>
> c.c: In Funktion »main«:
> c.c:5: error: storage size of `a' isn't known
> c.c:6: Warnung: implicit declaration of function `nanosleep'
> c.c:5: Warnung: unused variable `a'
>
> The same source is compiled finely without -std=c99.
The -std=c99 option means that you want strict compliance to the 1999
version of the C standard. That standard does not define struct timespec
or nanosleep in <time.h> or anywhere else. Thus, there is no bug.
Reply to: