#endif
-#if !defined(HAVE_GMTIME_R) && defined(HAVE_GMTIME)
+#if !defined(HAVE_GMTIME_R) && defined(HAVE_GMTIME) || defined(__BEOS__)
#define PHP_NEED_REENTRANCY 1
PHPAPI struct tm *php_gmtime_r(const time_t *const timep, struct tm *p_tm);
#else
#endif /* NETWARE */
+#if defined(__BEOS__)
+
+PHPAPI struct tm *php_gmtime_r(const time_t *const timep, struct tm *p_tm)
+{
+ /* Modified according to LibC definition */
+ if (((struct tm*)gmtime_r(timep, p_tm)) == p_tm)
+ return (p_tm);
+ return (NULL);
+}
+
+#endif /* BEOS */
+
#if !defined(HAVE_POSIX_READDIR_R)
PHPAPI int php_readdir_r(DIR *dirp, struct dirent *entry,