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 <youvedeep.singh@intel.com>
diff --git a/arch/posix/include/posix_cheats.h b/arch/posix/include/posix_cheats.h
index 7b66482..b0cc6b8 100644
--- a/arch/posix/include/posix_cheats.h
+++ b/arch/posix/include/posix_cheats.h
@@ -23,6 +23,8 @@
  * some prefix, and we ensure this header is included
  */
 
+#ifdef CONFIG_PTHREAD_IPC
+
 #define timespec zap_timespec
 #define pthread_mutex_t zap_pthread_mutex_t
 #define pthread_mutexattr_t    zap_pthread_mutexattr_t
@@ -114,6 +116,8 @@
 #define timer_gettime(...)	zap_timer_gettime(__VA_ARGS__)
 #define timer_settime(...)	zap_timer_settime(__VA_ARGS__)
 
+#endif /* CONFIG_PTHREAD_IPC */
+
 #endif /* CONFIG_ARCH_POSIX */
 
-#endif
+#endif /* _POSIX_CHEATS_H */