From 422f1ed8deebb37842a197d0d27e9e310d925539 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Tue, 6 Aug 2024 21:54:05 -0600 Subject: [PATCH] LibCore: Don't wrap `` in extern "C" on Darwin This causes issues when loading the file into a clang module, such as when using Core::MachPort from Objective-C or Swift. --- Userland/Libraries/LibCore/MachPort.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibCore/MachPort.h b/Userland/Libraries/LibCore/MachPort.h index 82c16652a09..373c9affe2f 100644 --- a/Userland/Libraries/LibCore/MachPort.h +++ b/Userland/Libraries/LibCore/MachPort.h @@ -15,9 +15,13 @@ #include #include +#if defined(AK_OS_MACOS) || defined(AK_OS_IOS) +# include +#else extern "C" { -#include +# include } +#endif namespace Core {