From ce11dabf5c009503dec40dad63f3d7510a045dc4 Mon Sep 17 00:00:00 2001 From: Nicola Ferruzzi Date: Tue, 5 May 2020 12:48:44 +0200 Subject: [PATCH] Fixed build for swift packages --- Sources/SQLite/Core/Connection.swift | 3 +++ Sources/SQLiteObjc/SQLiteObjc.m | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/SQLite/Core/Connection.swift b/Sources/SQLite/Core/Connection.swift index f50d2502..c2c83e6e 100644 --- a/Sources/SQLite/Core/Connection.swift +++ b/Sources/SQLite/Core/Connection.swift @@ -33,6 +33,9 @@ import CSQLite #else import SQLite3 #endif +#if SWIFT_PACKAGE +import SQLiteObjc +#endif /// A connection to SQLite. public final class Connection { diff --git a/Sources/SQLiteObjc/SQLiteObjc.m b/Sources/SQLiteObjc/SQLiteObjc.m index a0ec15f1..abce0046 100644 --- a/Sources/SQLiteObjc/SQLiteObjc.m +++ b/Sources/SQLiteObjc/SQLiteObjc.m @@ -138,7 +138,7 @@ int _SQLiteRegisterTokenizer(sqlite3 *db, const char * moduleName, const char * } void _SQLite_dispatch_async_and_wait(dispatch_queue_t queue, __attribute__((__noescape__)) dispatch_block_t block) { - if (@available(iOS 12.0, *)) { + if (@available(macOS 10.14, iOS 12.0, *)) { dispatch_async_and_wait(queue, block); } else { dispatch_sync(queue, block);