diff --git a/Sources/Subprocess/Configuration.swift b/Sources/Subprocess/Configuration.swift index 5396506..ef08ca9 100644 --- a/Sources/Subprocess/Configuration.swift +++ b/Sources/Subprocess/Configuration.swift @@ -533,9 +533,17 @@ internal enum StringOrRawBytes: Sendable, Hashable { func createRawBytes() -> UnsafeMutablePointer { switch self { case .string(let string): +#if os(Windows) + return _strdup(string) +#else return strdup(string) +#endif case .rawBytes(let rawBytes): +#if os(Windows) + return _strdup(rawBytes) +#else return strdup(rawBytes) +#endif } }