Skip to content

Commit d66519d

Browse files
authored
Add extern "C" to header process_shims.h (#195)
1 parent dc3bbd2 commit d66519d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Sources/_SubprocessCShims/include/process_shims.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
#include <sys/wait.h>
3636
#endif // TARGET_OS_LINUX || TARGET_OS_FREEBSD
3737

38+
#ifdef __cplusplus
39+
extern "C" {
40+
#endif
41+
3842
#if __has_include(<mach/vm_page_size.h>)
3943
vm_size_t _subprocess_vm_size(void);
4044
#endif
@@ -102,12 +106,20 @@ int _pidfd_open(pid_t pid);
102106

103107
#endif
104108

109+
#ifdef __cplusplus
110+
} // extern "C"
111+
#endif
112+
105113
#endif // !TARGET_OS_WINDOWS
106114

107115
#if TARGET_OS_WINDOWS
108116

109117
#include <Windows.h>
110118

119+
#ifdef __cplusplus
120+
extern "C" {
121+
#endif
122+
111123
#ifndef _WINDEF_
112124
typedef unsigned long DWORD;
113125
typedef int BOOL;
@@ -122,6 +134,10 @@ unsigned int _subprocess_windows_get_errno(void);
122134
/// complex macro and cannot be imported directly into Swift.
123135
DWORD_PTR _subprocess_PROC_THREAD_ATTRIBUTE_HANDLE_LIST(void);
124136

137+
#ifdef __cplusplus
138+
} // extern "C"
139+
#endif
140+
125141
#endif
126142

127143
#endif /* process_shims_h */

0 commit comments

Comments
 (0)