Netlink: Support glibc (#600)

- Closes #491.
This commit is contained in:
Danny Canter authored and GitHub committed 2026-03-30 10:58:32 -07:00
1 parent 72432f148c
commit 6444b23f13
2 files changed
+8 -1

No files matched your search

@@ -49,12 +49,20 @@ public enum NetlinkSocketError: Swift.Error, CustomStringConvertible, Equatable
}
}
#if os(Linux)
#if canImport(Musl)
import Musl
let osSocket = Musl.socket
let osBind = Musl.bind
let osSend = Musl.send
let osRecv = Musl.recv
#elseif canImport(Glibc)
import Glibc
let osSocket = Glibc.socket
let osBind = Glibc.bind
let osSend = Glibc.send
let osRecv = Glibc.recv
#endif
/// A default implementation of `NetlinkSocket`.
public class DefaultNetlinkSocket: NetlinkSocket {
@@ -15,7 +15,6 @@
//===----------------------------------------------------------------------===//
import ContainerizationExtras
import Foundation
struct SocketType {
static let SOCK_RAW: Int32 = 3