Skip to content

Commit 7774650

Browse files
committed
[cxx-interop] Fix CxxStdlib build error on CentOS
This fixes a build failure that started occurring on CentOS after #65057: ``` error: cannot find 'strlen' in scope ``` rdar://107987115
1 parent acc465d commit 7774650

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/Cxx/std/String.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ extension std.string {
3333
return
3434
}
3535

36-
let len = strlen(str)
36+
let len = UTF8._nullCodeUnitOffset(in: str)
3737
for i in 0..<len {
3838
let char = UInt8(str[i])
3939
self.push_back(value_type(bitPattern: char))

0 commit comments

Comments
 (0)