diff --git a/GRDB/Core/StatementAuthorizer.swift b/GRDB/Core/StatementAuthorizer.swift index 42691dbedf..54d9057781 100644 --- a/GRDB/Core/StatementAuthorizer.swift +++ b/GRDB/Core/StatementAuthorizer.swift @@ -1,8 +1,8 @@ -#if os(Linux) +#if canImport(string_h) +import string_h +#elseif os(Linux) import Glibc -#endif - -#if canImport(Darwin) +#elseif os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(visionOS) import Darwin #endif diff --git a/Tests/GRDBTests/DatabaseConfigurationTests.swift b/Tests/GRDBTests/DatabaseConfigurationTests.swift index 7ff0f47029..88fdb622b2 100644 --- a/Tests/GRDBTests/DatabaseConfigurationTests.swift +++ b/Tests/GRDBTests/DatabaseConfigurationTests.swift @@ -137,7 +137,6 @@ class DatabaseConfigurationTests: GRDBTestCase { } } catch let error as DatabaseError { XCTAssertEqual(error.resultCode, .SQLITE_ERROR) - XCTAssertEqual(error.message, "no such column: foo") XCTAssertEqual(error.sql, "SELECT \"foo\" FROM player") } @@ -151,10 +150,6 @@ class DatabaseConfigurationTests: GRDBTestCase { } } catch let error as DatabaseError { XCTAssertEqual(error.resultCode, .SQLITE_ERROR) - XCTAssert([ - "no such column: foo", - "table player has no column named foo"] - .contains(error.message)) XCTAssertEqual(error.sql, "CREATE INDEX i ON player(\"foo\")") } }