Skip to content

Commit ed59cb4

Browse files
committed
Add explicit cast to non-apple platforms
1 parent 1484f1c commit ed59cb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/Concurrency/DispatchGlobalExecutor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,14 +320,14 @@ clock_and_value_to_time(int clock, long long sec, long long nsec) {
320320
.tv_nsec = static_cast<long>(nsec)
321321
};
322322
#elif defined(__APPLE__)
323-
struct timespec ts = {
323+
struct timespec ts = {
324324
.tv_sec = static_cast<__darwin_time_t>(sec),
325325
.tv_nsec = nsec
326326
};
327327
#else
328328
struct timespec ts = {
329329
.tv_sec = static_cast<long>(sec),
330-
.tv_nsec = nsec
330+
.tv_nsec = static_cast<long>(nsec)
331331
};
332332
#endif
333333
return dispatch_walltime(&ts, 0);

0 commit comments

Comments
 (0)