Skip to content

Commit 005de61

Browse files
committed
Patching linux pointers
1 parent 1f1e9a9 commit 005de61

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Sources/SMTP.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,11 @@ public class EMail {
424424
}//end if
425425
let result = this.body.withCString { ptr -> Int in
426426
let size = remain > szblock ? szblock : remain
427-
memcpy(target, ptr.advanced(by: this.progress), size)
427+
#if os(Linux)
428+
memcpy(target!, ptr.advanced(by: this.progress), size)
429+
#else
430+
memcpy(target, ptr.advanced(by: this.progress), size)
431+
#endif
428432
return size
429433
}//end with
430434
this.progress += result

0 commit comments

Comments
 (0)