mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
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:
parent
9ca94f91a3
commit
83fbee6e0b
2 changed files with 4 additions and 4 deletions
|
|
@ -24,6 +24,9 @@
|
|||
#define COMMON_H
|
||||
|
||||
|
||||
#include <stddef.h> /* for offsetof() */
|
||||
|
||||
|
||||
typedef void (*PerfRateFunc)(unsigned count);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue