Skip to content

[FreeBSD] Enable CFRunLoop support #5188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/CoreFoundation/CFRunLoop.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ extern bool _dispatch_runloop_root_queue_perform_4CF(dispatch_queue_t queue);

#if TARGET_OS_MAC
typedef mach_port_t dispatch_runloop_handle_t;
#elif defined(__linux__) || defined(__FreeBSD__)
#elif defined(__linux__)
typedef int dispatch_runloop_handle_t;
#elif TARGET_OS_WIN32
typedef HANDLE dispatch_runloop_handle_t;
Expand Down
2 changes: 1 addition & 1 deletion Sources/Foundation/RunLoop.swift
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ open class RunLoop: NSObject {
// Make sure we honor the override -- var currentCFRunLoop will do so on platforms where overrides are available.

// TODO: This has been removed as public API in port to the package, because CoreFoundation cannot be available as both toolchain "CoreFoundation" and package "_CoreFoundation"
#if os(Linux) || os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(OpenBSD)
#if os(Linux) || os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(OpenBSD) || os(FreeBSD)
internal var currentCFRunLoop: CFRunLoop { getCFRunLoop() }

internal func getCFRunLoop() -> CFRunLoop {
Expand Down