[uClibc] time.h

Stuart Hughes seh at zee2.com
Wed Jul 2 18:22:38 UTC 2003


Manuel Novoa III wrote:
> 
> On Wed, Jul 02, 2003 at 05:12:18PM +0100, Stuart Hughes wrote:
> > Greetings,
> >
> > I had a problem with struct tm in time.h when compiling with a c++
> > compiler (mipsel-uclibc-g++).
> > If a declaration is: struct tm; (uninitialised)
> >
[snip]
> Your patch isn't going work, since the uClibc time code expects to
> store the timezone in the struct itself.  You'll wind up with
> overwrites and invalid memory accesses.
> 

Thought that may be the case.

> I suppose to get around this I'll have to add a seperate data field
> and initialize a __const char *__tm_zone member to point to the internal
> data array.  I was trying to avoid doing that, and wasn't counting on
> such nit-picky compilers.  Oh well...
> 
> For the time being, you could try removing the __const qualifier on the
> tm_zone[8] members.

Yes, that fixes it too.

Regards, Stuart



More information about the uClibc mailing list