apple / swift-nio-ssl

TLS Support for SwiftNIO, based on BoringSSL.
https://swiftpackageindex.com/apple/swift-nio-ssl/main/documentation/niossl
Apache License 2.0
385 stars 139 forks source link

Changes to support building with Musl. #450

Closed al45tair closed 7 months ago

al45tair commented 8 months ago

Define _GNU_SOURCE in the Package.swift.

Add imports for Musl in relevant places.

Remove types from sysXXX static variables.

FranzBusch commented 8 months ago

@swift-server-bot add to allowlist

FranzBusch commented 8 months ago

@swift-server-bot test this please

Lukasa commented 8 months ago

@swift-server-bot add to allowlist

Lukasa commented 8 months ago

This has caused an issue in the nightly compiler:

16:26:49 /code/Sources/NIOSSL/PosixPort.swift:44:26: error: cannot infer type of closure parameter '$0' without a type annotation
16:26:49 private let sysFclose =  { fclose($0!) }
16:26:49                          ^
16:26:49 /code/Sources/NIOSSL/PosixPort.swift:44:26: error: cannot infer type of closure parameter '$0' without a type annotation
16:26:49 private let sysFclose =  { fclose($0!) }
16:26:49                          ^
16:26:49 /code/Sources/NIOSSL/PosixPort.swift:44:26: error: cannot infer type of closure parameter '$0' without a type annotation
16:26:49 private let sysFclose =  { fclose($0!) }
16:26:49                          ^
16:26:49 /code/Sources/NIOSSL/PosixPort.swift:44:26: error: cannot infer type of closure parameter '$0' without a type annotation
16:26:49 private let sysFclose =  { fclose($0!) }
16:26:49                          ^