Skip to content

Commit f808fac

Browse files
authored
Restore building with LDC 1.28 :) (#13)
1 parent 3cba792 commit f808fac

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

source/numem/sync/semaphore.d

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,10 @@ public:
117117

118118
this.subCount();
119119
} else static if(IsAppleOS) {
120-
mach_timespec_t timeout = mach_timespec_t(
121-
tv_sec: cast(uint)convert!("msecs", "seconds")(timeoutMs),
122-
tv_nsec: cast(clock_res_t)convert!("msecs", "nsecs")(timeoutMs)
123-
);
124-
120+
mach_timespec_t timeout;
121+
timeout.tv_sec = cast(uint)convert!("msecs", "seconds")(timeoutMs);
122+
timeout.tv_nsec = cast(clock_res_t)convert!("msecs", "nsecs")(timeoutMs);
123+
125124
while(true) {
126125

127126
auto rc = semaphore_timedwait(handle, timeout);
@@ -136,10 +135,9 @@ public:
136135
}
137136

138137
} else version(Posix) {
139-
timespec timeout = timespec(
140-
tv_sec: convert!("msecs", "seconds")(timeoutMs),
141-
tv_nsec: convert!("msecs", "nsecs")(timeoutMs)
142-
);
138+
timespec timeout;
139+
timeout.tv_sec = convert!("msecs", "seconds")(timeoutMs);
140+
timeout.tv_nsec = convert!("msecs", "nsecs")(timeoutMs);
143141

144142
while(true) {
145143

0 commit comments

Comments
 (0)