Skip to content

Commit 36ae2b7

Browse files
committed
Fix build on Linux
1 parent 8830f5a commit 36ae2b7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Sources/FFFoundation/OSLogLinux.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#if !canImport(os)
2121
import Foundation
2222

23+
@frozen
2324
public struct OSLogType: RawRepresentable, Hashable {
2425
public typealias RawValue = UInt8
2526

@@ -85,7 +86,7 @@ public final class OSLog: NSObject {
8586
}
8687
}
8788

88-
fileprivate func write(message: StaticString, dso _: UnsafeRawPointer?, type: OSLogType, args: [CVarArg]) {
89+
fileprivate func write(message: StaticString, dso _: UnsafeRawPointer?, type: OSLogType, args: Array<any CVarArg>) {
8990
guard isEnabled(type: type) else { return }
9091
print("\(kind.logString) - [\(type.logString)]: \(String(format: String(describing: message), arguments: args))")
9192
}
@@ -97,6 +98,7 @@ extension OSLog {
9798
}
9899

99100
extension OSLog {
101+
@frozen
100102
public struct Category: RawRepresentable, Hashable {
101103
public typealias RawValue = String
102104

@@ -107,7 +109,7 @@ extension OSLog {
107109
}
108110
}
109111

110-
public func os_log(_ msg: StaticString, dso: UnsafeRawPointer? = #dsohandle, log: OSLog = .default, type: OSLogType = .default, _ args: CVarArg...) {
112+
public func os_log(_ msg: StaticString, dso: UnsafeRawPointer? = #dsohandle, log: OSLog = .default, type: OSLogType = .default, _ args: any CVarArg...) {
111113
log.write(message: msg, dso: dso, type: type, args: args)
112114
}
113115
#endif

0 commit comments

Comments
 (0)