Skip to content

Commit 036f567

Browse files
authored
Remove Windows warnings (#105)
These calls are missing their Windows counter parts, resulting warnings stating `X is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: Y. See online help for details`. Add them like the rest.
1 parent 348b4de commit 036f567

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Sources/System/Internals/WindowsSyscallAdapters.swift

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,23 @@ internal func write(
5858
Int(_write(fd, buf, numericCast(nbyte)))
5959
}
6060

61+
@inline(__always)
62+
internal func lseek(
63+
_ fd: Int32, _ off: off_t, _ whence: Int32
64+
) -> off_t {
65+
_lseek(fd, off, whence)
66+
}
67+
68+
@inline(__always)
69+
internal func dup(_ fd: Int32) -> Int32 {
70+
_dup(fd)
71+
}
72+
73+
@inline(__always)
74+
internal func dup2(_ fd: Int32, _ fd2: Int32) -> Int32 {
75+
_dup2(fd, fd2)
76+
}
77+
6178
@inline(__always)
6279
internal func pread(
6380
_ fd: Int32, _ buf: UnsafeMutableRawPointer!, _ nbyte: Int, _ offset: off_t

0 commit comments

Comments
 (0)