bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnubg] compiling problem


From: wayne . lydecker
Subject: [Bug-gnubg] compiling problem
Date: Thu, 26 Apr 2007 12:34:51 -0700
User-agent: Thunderbird 1.5.0.10 (X11/20070221)

After installing RedHat Enterprise 5 Linux, gnubg would no longer
install (from RPM).  I decided to download the latest source and
compile it, but got an error out of dice.c:

    dice.c: In function RNGSystemSeed:
    dice.c:789: error: storage size of tz isn't known

Not knowing how to fix it, I turned to google and found this page:

http://www.nabble.com/autoconf-problem-t3481321.html

<<< begin quote >>>
> There was a problem in dice.c

> dice.c: In function .RNGSystemSeed.:
> dice.c:789: error: storage size of .tz. isn.t known

>     if( !f ) {
> #if HAVE_GETTIMEOFDAY
> struct timeval tv;
> struct timezone tz;

> if( !gettimeofday( &tv, &tz ) )
>    n = tv.tv_sec ^ tv.tv_usec;
> else
> #endif

No modern Unix system does anything with the second argument to
gettimeofday any more.  You can almost certainly just delete the tz
variable and change &tz to NULL in the call.
<<< end quote >>>

I made this change to dice.c and everything built fine.
Because tz is not used by the procedure, I recommend this change
to the source so that others won't have to stumble upon the fix.

Thanks for the excellent gnubg product.

-- Wayne.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]