mirror of
https://github.com/apple/swift-system
synced 2026-11-26 04:57:54 +00:00
timespec should be compatible here, let's try it to fix the Ubuntu 22 build
This commit is contained in:
1 parent
329c5f59a2
commit
a6675d7e5c
2 files changed
+9
-9
No files matched your search
@@ -479,9 +479,9 @@ public struct IORing: ~Copyable {
|
||||
timeout: Duration? = nil
|
||||
) throws(Errno) -> Completion {
|
||||
if let timeout {
|
||||
var ts = __kernel_timespec(
|
||||
tv_sec: timeout.components.seconds,
|
||||
tv_nsec: timeout.components.attoseconds / 1_000_000_000
|
||||
var ts = timespec(
|
||||
tv_sec: Int(timeout.components.seconds),
|
||||
tv_nsec: Int(timeout.components.attoseconds / 1_000_000_000)
|
||||
)
|
||||
return try withUnsafePointer(to: &ts) { (tsPtr) throws(Errno) -> Completion in
|
||||
var args = swift_io_uring_getevents_arg(
|
||||
@@ -505,9 +505,9 @@ public struct IORing: ~Copyable {
|
||||
consumer: (consuming Completion?, Errno?, Bool) throws(Err) -> Void
|
||||
) throws(Err) {
|
||||
if let timeout {
|
||||
var ts = __kernel_timespec(
|
||||
tv_sec: timeout.components.seconds,
|
||||
tv_nsec: timeout.components.attoseconds / 1_000_000_000
|
||||
var ts = timespec(
|
||||
tv_sec: Int(timeout.components.seconds),
|
||||
tv_nsec: Int(timeout.components.attoseconds / 1_000_000_000)
|
||||
)
|
||||
try withUnsafePointer(to: &ts) { (tsPtr) throws(Err) in
|
||||
var args = swift_io_uring_getevents_arg(
|
||||
|
||||
@@ -184,9 +184,9 @@ extension RawIORequest {
|
||||
|
||||
opEntry.pointee.flags |= Flags.linkRequest.rawValue
|
||||
opEntry.pointee.off = 1
|
||||
var ts = __kernel_timespec(
|
||||
tv_sec: duration.components.seconds,
|
||||
tv_nsec: duration.components.attoseconds / 1_000_000_000
|
||||
var ts = timespec(
|
||||
tv_sec: Int(duration.components.seconds),
|
||||
tv_nsec: Int(duration.components.attoseconds / 1_000_000_000)
|
||||
)
|
||||
return try withUnsafePointer(to: &ts) { tsPtr in
|
||||
var req: RawIORequest = RawIORequest()
|
||||
|
||||
Reference in new issue
Block a user