summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-09-21 11:09:00 -0600
committerBrian Paul <brianp@vmware.com>2009-09-21 11:09:47 -0600
commit83fbee6e0be46efab4b60ba50fceb103f8937ac1 (patch)
tree73d74a95f3266565b98e9d109959627c0b668455 /progs
parent9ca94f91a3b48350b02a8fec5ecf60a819a24de5 (diff)
progs/perf: offsetof() should be defined in stddef.h, include it
If this breaks mingw, feel free to revert this.
Diffstat (limited to 'progs')
-rw-r--r--progs/perf/common.h3
-rw-r--r--progs/perf/teximage.c5
2 files changed, 4 insertions, 4 deletions
diff --git a/progs/perf/common.h b/progs/perf/common.h
index fc49bbed32..6ea17402b5 100644
--- a/progs/perf/common.h
+++ b/progs/perf/common.h
@@ -24,6 +24,9 @@
#define COMMON_H
+#include <stddef.h> /* for offsetof() */
+
+
typedef void (*PerfRateFunc)(unsigned count);
diff --git a/progs/perf/teximage.c b/progs/perf/teximage.c
index 11d781fccc..634cd83558 100644
--- a/progs/perf/teximage.c
+++ b/progs/perf/teximage.c
@@ -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