Skip to content

Commit 1db8c46

Browse files
committed
Merge remote-tracking branch 'origin/master' into master-rebranch
2 parents 678ac37 + 541a717 commit 1db8c46

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stdlib/public/stubs/Random.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ void swift::swift_stdlib_random(void *buf, __swift_size_t nbytes) {
7070
#else
7171

7272
#undef WHILE_EINTR
73-
#define WHILE_EINTR(expression) ({ \
73+
#define WHILE_EINTR(expression) ([&] () -> decltype(expression) { \
7474
decltype(expression) result = -1; \
7575
do { result = (expression); } while (result == -1 && errno == EINTR); \
76-
result; \
77-
})
76+
return result; \
77+
}())
7878

7979
SWIFT_RUNTIME_STDLIB_API
8080
void swift::swift_stdlib_random(void *buf, __swift_size_t nbytes) {

0 commit comments

Comments
 (0)