Skip to content

Commit 9e95243

Browse files
committed
[libdispatch] Linux build fixes
* Dispatch's shims header file was not adequately protected against building on Linux (which does not have the blocks runtime).
1 parent f714ff5 commit 9e95243

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

stdlib/public/SwiftShims/DispatchShims.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#ifndef SWIFT_STDLIB_SHIMS_DISPATCHSHIMS_H
2020
#define SWIFT_STDLIB_SHIMS_DISPATCHSHIMS_H
2121

22-
//#include <dispatch/dispatch.h>
22+
#ifdef __OBJC2__
2323

2424
#include "SwiftStdint.h"
2525
#include "SwiftStddef.h"
@@ -99,5 +99,7 @@ void _swift_dispatch_apply_current(
9999
}} // extern "C", namespace swift
100100
#endif
101101

102+
#endif // __OBJC2__
103+
102104
#endif // SWIFT_STDLIB_SHIMS_DISPATCHSHIMS_H
103105

0 commit comments

Comments
 (0)