From b287d38f51e5b00f5cdc8bb3e1e775519efebd80 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 17 Sep 2024 08:37:40 -0700 Subject: [PATCH] Support: unwrap storage for parameter to `pipe` Android declares pipe as: ``` int pipe(int __fds[_Nonnull 2]); ``` Ensure that we unwrap the storage before we pass along the parameter to the syscall. This repairs the build for Android. --- Sources/Testing/Support/FileHandle.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Testing/Support/FileHandle.swift b/Sources/Testing/Support/FileHandle.swift index 6bf55f018..4caa77074 100644 --- a/Sources/Testing/Support/FileHandle.swift +++ b/Sources/Testing/Support/FileHandle.swift @@ -447,7 +447,7 @@ extension FileHandle { throw CError(rawValue: swt_errno()) } #else - guard 0 == pipe(fds.baseAddress) else { + guard 0 == pipe(fds.baseAddress!) else { throw CError(rawValue: swt_errno()) } #endif