Module: Mesa Branch: master Commit: 83fbee6e0be46efab4b60ba50fceb103f8937ac1 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=83fbee6e0be46efab4b60ba50fceb103f8937ac1
Author: Brian Paul <[email protected]> Date: Mon Sep 21 11:09:00 2009 -0600 progs/perf: offsetof() should be defined in stddef.h, include it If this breaks mingw, feel free to revert this. --- progs/perf/common.h | 3 +++ progs/perf/teximage.c | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/progs/perf/common.h b/progs/perf/common.h index fc49bbe..6ea1740 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 11d781f..634cd83 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 _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
