Skip to content

Commit c26cd00

Browse files
3405691582finagolfin
authored andcommitted
OpenBSD 7.8 will require OpaquePointer for FILE.
We changed Swift to use OpaquePointer in Glibc since OpenBSD 7.8 snapshots now hide the type information for FILE. Therefore, the types for the standard stdio streams should (regrettably) be OpaquePointer, due to the well-discussed issue of losing type information for forward-declared C types. Subsequently, this means we should be using OpaquePointer here also.
1 parent a00f2e3 commit c26cd00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/TSCBasic/WritableByteStream.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public extension WritableByteStream {
6666
// Public alias to the old name to not introduce API compatibility.
6767
public typealias OutputByteStream = WritableByteStream
6868

69-
#if os(Android)
69+
#if os(Android) || os(OpenBSD)
7070
public typealias FILEPointer = OpaquePointer
7171
#else
7272
public typealias FILEPointer = UnsafeMutablePointer<FILE>

0 commit comments

Comments
 (0)