summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJano Svitok <jsv@whitestein.com>2020-04-27 09:12:42 +0200
committerGitHub <noreply@github.com>2020-04-27 08:12:42 +0100
commit3127e4abd94728a60849c80bed84c2c338067a01 (patch)
tree7ede95703e35103cd1d28df7eb5f1c5f60f93620 /lib
parentb83ae2cedf8a345142c3b96e9b529a65fe41bc16 (diff)
downloadthrift-3127e4abd94728a60849c80bed84c2c338067a01.tar.gz
THRIFT-5150: Fix compilation with Swift 5.2
- (OS X and Linux) type 'TSet<Element>' does not conform to protocol 'Collection' - (Linux only) kCFSocketCloseOnInvalidate has Int type Client: swift
Diffstat (limited to 'lib')
-rw-r--r--lib/swift/Sources/TSet.swift1
-rw-r--r--lib/swift/Sources/TSocketServer.swift2
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/swift/Sources/TSet.swift b/lib/swift/Sources/TSet.swift
index d340fec6a..9d89d14a9 100644
--- a/lib/swift/Sources/TSet.swift
+++ b/lib/swift/Sources/TSet.swift
@@ -30,6 +30,7 @@ public struct TSet<Element : TSerializable & Hashable> : SetAlgebra, Hashable, C
/// Mark: Collection
+ public typealias Element = Storage.Element
public typealias Indices = Storage.Indices
public typealias Index = Storage.Index
public typealias IndexDistance = Int
diff --git a/lib/swift/Sources/TSocketServer.swift b/lib/swift/Sources/TSocketServer.swift
index 6cfb5a10c..5d0dd4941 100644
--- a/lib/swift/Sources/TSocketServer.swift
+++ b/lib/swift/Sources/TSocketServer.swift
@@ -56,7 +56,7 @@ class TSocketServer<InProtocol: TProtocol, OutProtocol: TProtocol, Processor: TP
let sock = CFSocketCreate(kCFAllocatorDefault, PF_INET, SOCK_STREAM, IPPROTO_TCP, 0, nil, nil)
#endif
if sock != nil {
- CFSocketSetSocketFlags(sock, CFSocketGetSocketFlags(sock) & ~kCFSocketCloseOnInvalidate)
+ CFSocketSetSocketFlags(sock, CFSocketGetSocketFlags(sock) & ~CFOptionFlags(kCFSocketCloseOnInvalidate))
fd = CFSocketGetNative(sock)
var yes = 1