Tags: ZewoGraveyard/OpenSSL
Tags
Fix for rand() error in Swift 3 (#20) When playing with a package that was related to this package, I found that Swift 3 gave the following error: /Users/mhughes/Projects/Kitura/Packages/OpenSSL-0.8.4/Sources/OpenSSL/Certificate.swift:86:16: error: 'rand()' is unavailable in Swift: Use arc4random instead. let serial = rand() ^~~~ Darwin.rand:2:13: note: 'rand()' has been explicitly marked unavailable here public func rand() -> Int32 ^ <unknown>:0: error: build had 1 command failures This patch makes that small change. Also includes support for Linux and Apple platforms, but doesn't support any/all other platforms (Windows, BSD, etc.) at this point.
PreviousNext