Skip to content

Commit 3a2beae

Browse files
authored
Merge pull request swiftlang#81478 from compnerd/silence
CommandLineSupport: prefer `_strdup` over `strdup`
2 parents 80e8d3a + f411fcd commit 3a2beae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

stdlib/public/CommandLineSupport/CommandLine.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,11 @@ char **_swift_stdlib_getUnsafeArgvArgc(int *outArgLen) {
135135
}
136136
}
137137

138+
#if defined(_WIN32)
139+
argv[argc] = _strdup(arg);
140+
#else
138141
argv[argc] = strdup(arg);
142+
#endif
139143
argc += 1;
140144
});
141145

0 commit comments

Comments
 (0)