aboutsummaryrefslogtreecommitdiffstats
path: root/stdtime
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-12-14 23:36:30 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-12-14 23:36:30 +0000
commit70cedacdde512d2ed5984eec242c55f3239b73fc (patch)
tree48694f38698e4ead3840305333816193c7fcd8a0 /stdtime
parentc60f8a2b8e1551244e674baff85cb1a4f2d5fd5b (diff)
Merge slimey's Solaris compatibility (with small mods) (bug #2740)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4446 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'stdtime')
-rwxr-xr-xstdtime/localtime.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/stdtime/localtime.c b/stdtime/localtime.c
index 1f6309e3f..2f9d412fd 100755
--- a/stdtime/localtime.c
+++ b/stdtime/localtime.c
@@ -113,6 +113,12 @@ struct lsinfo { /* leap second information */
#define MY_TZNAME_MAX 255
#endif /* !defined TZNAME_MAX */
+#ifdef SOLARIS
+#undef TM_ZONE
+#undef TM_GMTOFF
+#endif
+
+
struct state {
char name[TZ_STRLEN_MAX + 1];
int leapcnt;
@@ -1208,7 +1214,11 @@ const time_t * const timep;
char *buf;
{
struct tm tm;
+#ifdef SOLARIS
+ return asctime_r(localtime_r(timep, &tm), buf, 256);
+#else
return asctime_r(localtime_r(timep, &tm), buf);
+#endif
}
/*