This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ob] Fix mingw build


On Tue, Feb 06, 2007 at 10:32:48AM +1300, Nick Roberts wrote:
>  > Our autotester broke after Nick's timings patch; we have a forward
>  > declaration of struct timeval, but not a full definition.  This fixes
>  > it.  We already include <sys/time.h> unconditionally in a number of
>  > other places.
> 
> I don't quite understand why it failed as the timeval members are only 
> accessed in mi-main.c which already included sys/time.h (for mi_load_progress).

Because struct mi_timestamp contains struct timeval members.  If you
don't have a definition of the structure in scope, then it's
"incomplete" - the compiler does not know what size it is, so it can
not lay out a structure containing one.

> It's best here anyway.  Although it doesn't break anything, maybe it should be
> removed from mi-main.c now.

I tend to leave it - that file will need it even if it's removed from
here for some reason.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]