progs/perf: offsetof() should be defined in stddef.h, include it

If this breaks mingw, feel free to revert this.
This commit is contained in:
Brian Paul 2009-09-21 11:09:00 -06:00
parent 9ca94f91a3
commit 83fbee6e0b
2 changed files with 4 additions and 4 deletions

View file

@ -24,6 +24,9 @@
#define COMMON_H
#include <stddef.h> /* for offsetof() */
typedef void (*PerfRateFunc)(unsigned count);

View file

@ -50,11 +50,8 @@ static const struct vertex vertices[1] = {
{ 0.0, 0.0, 0.5, 0.5 },
};
#if 0
#define VOFFSET(F) ((void *) offsetof(struct vertex, F))
#else
#define VOFFSET(F) ((void *) &((struct vertex *)NULL)->F)
#endif
/** Called from test harness/main */
void