Skip to content

Commit 9ae6024

Browse files
arch: POSIX: Add guard into posix_cheats file.
Some of APIs of POSIX implmentation layer has same name as native_posix architecture. posix_cheats.h is used to handle this duplication in API name. Adding a guard in posix_cheats.h based on CONFIG_PTHREAD_API. Signed-off-by: Youvedeep Singh <[email protected]>
1 parent a4d00b5 commit 9ae6024

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

arch/posix/include/posix_cheats.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
* some prefix, and we ensure this header is included
2424
*/
2525

26+
#ifdef CONFIG_PTHREAD_IPC
27+
2628
#define timespec zap_timespec
2729
#define pthread_mutex_t zap_pthread_mutex_t
2830
#define pthread_mutexattr_t zap_pthread_mutexattr_t
@@ -114,6 +116,8 @@
114116
#define timer_gettime(...) zap_timer_gettime(__VA_ARGS__)
115117
#define timer_settime(...) zap_timer_settime(__VA_ARGS__)
116118

119+
#endif /* CONFIG_PTHREAD_IPC */
120+
117121
#endif /* CONFIG_ARCH_POSIX */
118122

119-
#endif
123+
#endif /* _POSIX_CHEATS_H */

0 commit comments

Comments
 (0)