Document shorthand gmtime macros
diff --git a/include/mbedtls/threading.h b/include/mbedtls/threading.h
index 0707152..e613be9 100644
--- a/include/mbedtls/threading.h
+++ b/include/mbedtls/threading.h
@@ -100,13 +100,18 @@
extern mbedtls_threading_mutex_t mbedtls_threading_readdir_mutex;
#endif
#if defined(MBEDTLS_HAVE_TIME_DATE)
-#if !defined(_WIN32) && (defined(__unix__) || \
- (defined(__APPLE__) && defined(__MACH__)))
+#if !defined(_WIN32) && (defined(unix) || defined(__unix) || \
+ defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)))
#include <unistd.h>
#if !defined(_POSIX_VERSION) || 200112L > _POSIX_THREAD_SAFE_FUNCTIONS
+/*
+ * The preprocessor conditions above are the same as in platform_utils.c and
+ * threading.c. Remember to update the code there when changing the conditions
+ * here
+ */
extern mbedtls_threading_mutex_t mbedtls_threading_gmtime_mutex;
#endif /* !_POSIX_VERSION || 200112L > _POSIX_THREAD_SAFE_FUNCTIONS */
-#endif /* !_WIN32 && (__unix__ || (__APPLE__ && __MACH__)) */
+#endif /* !_WIN32 && (unix || __unix || __unix__ || (__APPLE__ && __MACH__)) */
#endif /* MBEDTLS_HAVE_TIME_DATE */
#endif /* MBEDTLS_THREADING_C */