diff --git a/Sources/_SubprocessCShims/include/process_shims.h b/Sources/_SubprocessCShims/include/process_shims.h index 584d5418..cd4b3423 100644 --- a/Sources/_SubprocessCShims/include/process_shims.h +++ b/Sources/_SubprocessCShims/include/process_shims.h @@ -35,6 +35,10 @@ #include #endif // TARGET_OS_LINUX || TARGET_OS_FREEBSD +#ifdef __cplusplus +extern "C" { +#endif + #if __has_include() vm_size_t _subprocess_vm_size(void); #endif @@ -102,12 +106,20 @@ int _pidfd_open(pid_t pid); #endif +#ifdef __cplusplus +} // extern "C" +#endif + #endif // !TARGET_OS_WINDOWS #if TARGET_OS_WINDOWS #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef _WINDEF_ typedef unsigned long DWORD; typedef int BOOL; @@ -122,6 +134,10 @@ unsigned int _subprocess_windows_get_errno(void); /// complex macro and cannot be imported directly into Swift. DWORD_PTR _subprocess_PROC_THREAD_ATTRIBUTE_HANDLE_LIST(void); +#ifdef __cplusplus +} // extern "C" +#endif + #endif #endif /* process_shims_h */