Skip to content

Commit bcf7079

Browse files
committed
Replaced deprecated function stime which is removed in glibc 2.31
1 parent 75ab6d0 commit bcf7079

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

runtime/flang/stime3f.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@
1818
int ENT3F(STIME, stime)(int *tp)
1919
{
2020
int i;
21-
time_t t = *tp;
21+
struct timespec ts = {0};
2222

23-
if ((i = stime(&t)))
23+
ts.tv_sec = *tp;
24+
if ((i = clock_settime(CLOCK_REALTIME, &ts)))
2425
i = __io_errno();
2526

2627
return i;

0 commit comments

Comments
 (0)