diff --git a/osdep/mac/swift_compat.swift b/osdep/mac/swift_compat.swift index 24365cdd4a..bac1abe082 100644 --- a/osdep/mac/swift_compat.swift +++ b/osdep/mac/swift_compat.swift @@ -16,7 +16,7 @@ */ #if !swift(>=5.7) -extension NSCondition { +extension NSLocking { func withLock(_ body: () throws -> R) rethrows -> R { self.lock() defer { self.unlock() }