Fixup some merge issues

This commit is contained in:
Michael Ilseman committed 2021-02-26 12:59:31 -07:00
1 parent bae68a5651
commit b28263a910
2 files changed
+5 -5

No files matched your search

+3 -3
View File
@@ -138,10 +138,10 @@ internal var forceWindowsPaths: Bool {
#if ENABLE_MOCKING
// Strip the mock_system prefix and the arg list suffix
private func originalSyscallName(_ s: String) -> String {
private func originalSyscallName(_ function: String) -> String {
// `function` must be of format `system_<name>(<parameters>)`
precondition(s.starts(with: "system_"))
return String(s.dropFirst("system_".count).prefix { $0.isLetter })
precondition(function.starts(with: "system_"))
return String(function.dropFirst("system_".count).prefix { $0 != "(" })
}
private func mockImpl(
+2 -2
View File
@@ -102,14 +102,14 @@ internal func system_pwrite(
return pwrite(fd, buf, nbyte, offset)
}
public func system_dup(_ fd: Int32) -> Int32 {
internal func system_dup(_ fd: Int32) -> Int32 {
#if ENABLE_MOCKING
if mockingEnabled { return _mock(fd) }
#endif
return dup(fd)
}
public func system_dup2(_ fd: Int32, _ fd2: Int32) -> Int32 {
internal func system_dup2(_ fd: Int32, _ fd2: Int32) -> Int32 {
#if ENABLE_MOCKING
if mockingEnabled { return _mock(fd, fd2) }
#endif