Skip to content

Commit 4a4085d

Browse files
committed
[mdb] Switch to posix mutex
TSan does not support sysv semaphores, so switch to posix mutex. Also, disable robust mutexes, since we do not support multi-process access to the database anyway.
1 parent 8c593c4 commit 4a4085d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Package.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:4.2
1+
// swift-tools-version:5.0
22

33
import PackageDescription
44

@@ -70,7 +70,11 @@ let package = Package(
7070
.target(
7171
name: "IndexStoreDB_Database",
7272
dependencies: ["IndexStoreDB_Core"],
73-
path: "lib/Database"),
73+
path: "lib/Database",
74+
cSettings: [
75+
.define("MDB_USE_POSIX_MUTEX", to: "1"),
76+
.define("MDB_USE_ROBUST", to: "0"),
77+
]),
7478

7579
// Core index types.
7680
.target(

0 commit comments

Comments
 (0)