Skip to content

Commit 6448546

Browse files
stephanosiombolivar-nordic
authored andcommitted
timing: Fix symbol extern for C++
This commit adds `extern "C"` to `timing.h` so that C function names do not get mangled when including this header file from a C++ source file. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent f4e0cc7 commit 6448546

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

include/zephyr/timing/timing.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
#include <zephyr/sys/arch_interface.h>
1111
#include <zephyr/timing/types.h>
1212

13+
#ifdef __cplusplus
14+
extern "C" {
15+
#endif
16+
1317
void soc_timing_init(void);
1418
void soc_timing_start(void);
1519
void soc_timing_stop(void);
@@ -175,4 +179,8 @@ static inline uint32_t timing_freq_get_mhz(void)
175179
* @}
176180
*/
177181

182+
#ifdef __cplusplus
183+
}
184+
#endif
185+
178186
#endif /* ZEPHYR_INCLUDE_TIMING_TIMING_H_ */

0 commit comments

Comments
 (0)