Skip to content

Commit cff2b11

Browse files
authored
Tests link with libutil for openpty on OpenBSD. (#1285)
One of the tests refers to openpty, which requires linking with libutil on OpenBSD. ### Motivation: swift test on the project has a link failure on OpenBSD. ### Modifications: Add the libutil linker flag in Package.swift ### Checklist: - [X] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [X] If public symbols are renamed or modified, DocC references should be updated. ***(not required).***
1 parent 887871b commit cff2b11

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Package.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ let package = Package(
139139
"_Testing_WinSDK",
140140
"MemorySafeTestingTests",
141141
],
142-
swiftSettings: .packageSettings
142+
swiftSettings: .packageSettings,
143+
linkerSettings: [
144+
.linkedLibrary("util", .when(platforms: [.openbsd]))
145+
]
143146
),
144147

145148
// Use a plain `.target` instead of a `.testTarget` to avoid the unnecessary

0 commit comments

Comments
 (0)