tags 455363 + patch
kthxbye

On Sun, Dec 09, 2007 at 02:02:13PM -0700, Martin Michlmayr wrote:
In file included from cbm.cpp:3:
statistics.hpp:10: error: field 'timestamp' has incomplete type

This is a C error as well; you can't define an object of aggregate type (a struct, union, or class) unless you have a declaration of that type in scope. Otherwise, the compiler cannot reserve enough space for it. This is what it means by incomplete type.

You are, incidentally, permitted to define a *pointer* to an incomplete type, because most implementations have all pointers the same size (so it is immediately apparent how much space to reserve).

A patch is attached that includes <sys/time.h> to provide a declaration.

--
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
a typesetting engine: http://crustytoothpaste.ath.cx/~bmc/code/thwack
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
--- cbm-0.1/src/statistics.hpp.old	2007-12-10 00:38:19.000000000 +0000
+++ cbm-0.1/src/statistics.hpp	2007-12-10 00:39:12.000000000 +0000
@@ -3,6 +3,7 @@
 
 #include <list>
 #include <string>
+#include <sys/time.h>
 
 namespace statistics {
     

Attachment: signature.asc
Description: Digital signature

Reply via email to