Skip to content

Commit 8c8bf72

Browse files
committed
Fix iOS build issue
1 parent 3bd5060 commit 8c8bf72

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Sources/COpenSwiftUICore/include/kdebug_Private.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@
4343
#include <stdint.h>
4444
#include <stdbool.h>
4545
#include <sys/cdefs.h>
46+
47+
#if OPENSWIFTUI_TARGET_OS_OSX
4648
#include <sys/kdebug.h>
49+
#endif
4750

4851
#include <Availability.h>
4952

@@ -69,7 +72,7 @@
6972
*
7073
* On error, -1 will be returned and errno will indicate the error.
7174
*/
72-
int kdebug_trace(uint32_t code, uint64_t arg1, uint64_t arg2, uint64_t arg3,
75+
OPENSWIFTUI_EXPORT int kdebug_trace(uint32_t code, uint64_t arg1, uint64_t arg2, uint64_t arg3,
7376
uint64_t arg4)
7477
__OSX_AVAILABLE(10.10) __IOS_AVAILABLE(8.2);
7578

@@ -137,7 +140,7 @@ __OSX_AVAILABLE(10.10) __IOS_AVAILABLE(8.2);
137140
* EFAULT
138141
* `str` is an invalid address or NULL when `str_id` is 0.
139142
*/
140-
extern uint64_t kdebug_trace_string(uint32_t debugid, uint64_t str_id,
143+
OPENSWIFTUI_EXPORT uint64_t kdebug_trace_string(uint32_t debugid, uint64_t str_id,
141144
const char *str)
142145
__OSX_AVAILABLE(10.11) __IOS_AVAILABLE(9.0);
143146

@@ -156,7 +159,7 @@ __OSX_AVAILABLE(10.11) __IOS_AVAILABLE(9.0);
156159
* If tracing is enabled for the code at the time of the check, 1
157160
* will be returned. Otherwise, 0 will be returned.
158161
*/
159-
extern bool kdebug_is_enabled(uint32_t code)
162+
OPENSWIFTUI_EXPORT bool kdebug_is_enabled(uint32_t code)
160163
__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0)
161164
__WATCHOS_AVAILABLE(3.0) __TVOS_AVAILABLE(10.0);
162165

0 commit comments

Comments
 (0)