mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-19 21:27:57 +00:00
f2eb2bf9ab
If the Swift 3 or Swift 4 compiler is present or passed to the configure script in the SWIFTC variable, then the Makefile will compile a Swift 'servaldswift' executable to ensure that the module map links correctly into a stand-alone Swift program. Use the gold linker if supported, to avoid relocation errors on symbols produced by Swift when linking dynamic libraries.
15 lines
348 B
Swift
15 lines
348 B
Swift
import Foundation
|
|
import servald.main
|
|
|
|
public func serval_daemon_main(args: [String]) -> CInt {
|
|
// print "args = \(args)"
|
|
var argv = args.map { strdup($0) }
|
|
argv.append(nil)
|
|
defer {
|
|
argv.forEach { free($0) }
|
|
}
|
|
return servald_main(CInt(argv.count - 1), &argv)
|
|
}
|
|
|
|
exit(serval_daemon_main(args: CommandLine.arguments))
|