diff --git a/src/xpdev/unixtime.c b/src/xpdev/unixtime.c
index a27c1f15dd60f9117d0a58daa8865752b29ee1d0..380646f548dd96ae76313cba7f69af37d78bb700 100644
--- a/src/xpdev/unixtime.c
+++ b/src/xpdev/unixtime.c
@@ -11,8 +11,13 @@
 #define USE_SNPRINTF	/* we don't need safe_snprintf for this project */
 #include "genwrap.h"
 
-#define TIMEZONE	_timezone
-#define DAYLIGHT	_daylight
+#if !defined(__unix__)
+	#define TIMEZONE	_timezone
+	#define DAYLIGHT	_daylight
+#else
+	#define TIMEZONE	timezone
+	#define DAYLIGHT	daylight
+#endif
 
 /****************************************************************************/
 /* Converts a date string in format MM/DD/YY into unix time format			*/