Convert GCC extension initializer syntax to C99.
This commit is contained in:
parent
5a9c848490
commit
519d2b2e9f
|
@ -56,7 +56,7 @@ __setitimer (which, new, old)
|
|||
case -1: exit(-1);
|
||||
case 0:
|
||||
{
|
||||
struct timespec ts ={tv_sec:(long int)new->it_value.tv_sec,tv_nsec:0};
|
||||
struct timespec ts ={.tv_sec = (long int)new->it_value.tv_sec, .tv_nsec = 0};
|
||||
__libc_nanosleep(&ts,&ts);
|
||||
__kill(getppid(), SIGALRM);
|
||||
exit(0);
|
||||
|
|
|
@ -27,7 +27,7 @@ unsigned int
|
|||
__sleep (seconds)
|
||||
unsigned int seconds;
|
||||
{
|
||||
struct timespec ts ={tv_sec:(long int)seconds,tv_nsec:0};
|
||||
struct timespec ts ={.tv_sec = (long int)seconds, .tv_nsec = 0};
|
||||
__libc_nanosleep(&ts,&ts);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ int
|
|||
usleep (useconds)
|
||||
useconds_t useconds;
|
||||
{
|
||||
struct timespec ts ={tv_sec:0,tv_nsec:(long int)useconds * 1000};
|
||||
struct timespec ts ={.tv_sec = 0, .tv_nsec = (long int)useconds * 1000};
|
||||
__libc_nanosleep(&ts,&ts);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue