Skip to content

Commit 1f5bbb0

Browse files
authored
Merge pull request #111 from compnerd/windows-mutexes
build: disable POSIX mutexes on Windows
2 parents c2d6f20 + 62b4f5e commit 1f5bbb0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Package.swift

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

33
import PackageDescription
44

@@ -72,7 +72,9 @@ let package = Package(
7272
dependencies: ["IndexStoreDB_Core"],
7373
path: "lib/Database",
7474
cSettings: [
75-
.define("MDB_USE_POSIX_MUTEX", to: "1"),
75+
.define("MDB_USE_POSIX_MUTEX", to: "1",
76+
// Windows does not use POSIX mutex
77+
.when(platforms: [.linux, .macOS])),
7678
.define("MDB_USE_ROBUST", to: "0"),
7779
]),
7880

0 commit comments

Comments
 (0)