Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jan 2003 20:13:58 -0500
From:      "Mezz bsdforums.org" <reigncracks@hotmail.com>
To:        gnome@freebsd.org
Subject:   question about timeval in gaim-cvs..
Message-ID:  <F85hW4jtTqQX6eZ02GN0000c153@hotmail.com>

next in thread | raw e-mail | index | archive | help
Today, I upgraded gaim-cvs and compile on my own. I got error by related 
with timeval like this..

================================================================
BROKEN -I/usr/local/include -c proxy.c
proxy.c: In function `gaim_gethostbyname_async':
proxy.c:427: variable `tv' has initializer but incomplete type
proxy.c:427: unknown field `tv_sec' specified in initializer
proxy.c:427: warning: excess elements in struct initializer
proxy.c:427: warning: (near initialization for `tv')
proxy.c:427: unknown field `tv_usec' specified in initializer
proxy.c:427: warning: excess elements in struct initializer
proxy.c:427: warning: (near initialization for `tv')
proxy.c:427: storage size of `tv' isn't known
================================================================

So, I figured out to solve it by added "#include <sys/time.h>". My question 
is which way is better or correct?

struct timeval tv = { .tv_sec = 40 , .tv_usec = 0 };

or

struct timeval tv;
tv.tv_sec = 40;
tv.tv_usec = 0;

The first one is what gaim-cvs has, so if second one is better then I can 
email to gaim about bug of forgot to add include sys/time.h and tweak (if 
need) the timeval part. I don't program anything in C, but able to guess in 
somehow. :-)

Cheers,
Mezz

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-gnome" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F85hW4jtTqQX6eZ02GN0000c153>