mirror of
https://github.com/apple/swift-log
synced 2026-11-25 03:57:48 +00:00
I've added support for FreeBSD. I've only tested this PR on FreeBSD, but I believe it should also work on OpenBSD. ### Motivation: closes #372 Also, [Swift on FreeBSD preview toolchain](https://forums.swift.org/t/swift-on-freebsd-preview/83064) is now available. ### Modifications: - changed pthread-related code for *BSD - changed `Glibc.stdout` and `Glibc.stderr` for *BSD because they are non-optional on *BSD ### Result: swift-log and packages depending on it will be usable on FreeBSD. ### Checks: I tested it with `swift build` and `swift test`. All tests have passed. ```console $ swift test ... Test Suite 'All tests' passed at 2025-11-07 04:29:34.003 Executed 0 tests, with 0 failures (0 unexpected) in 0.0 (0.0) seconds ... ✔ Test run with 52 tests in 7 suites passed after 0.309 seconds. ``` Environment: ```console $ uname -a FreeBSD Coconut-rhinoceros-beetle 15.0-BETA4 FreeBSD 15.0-BETA4 releng/15.0-n280841-a7707f2a3bf4 GENERIC amd64 $ swift --version Swift version 6.3-dev (LLVM bff1370bd79c983, Swift 57cf4ce563f700b) Target: x86_64-unknown-freebsd14.3 Build config: +assertions ``` Swift toolchain is from https://forums.swift.org/t/swift-on-freebsd-preview/83064. --------- Co-authored-by: Franz Busch <f.busch@apple.com>