Skip to content

Commit

Permalink
Patching linux pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
RockfordWei committed Mar 31, 2017
1 parent 1f1e9a9 commit 005de61
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/SMTP.swift
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,11 @@ public class EMail {
}//end if
let result = this.body.withCString { ptr -> Int in
let size = remain > szblock ? szblock : remain
memcpy(target, ptr.advanced(by: this.progress), size)
#if os(Linux)
memcpy(target!, ptr.advanced(by: this.progress), size)
#else
memcpy(target, ptr.advanced(by: this.progress), size)
#endif
return size
}//end with
this.progress += result
Expand Down

0 comments on commit 005de61

Please sign in to comment.