Mesa (master): util: add dummy field to empty structure types
Brian Paul
brianp at kemper.freedesktop.org
Mon Jul 19 16:51:05 UTC 2010
Module: Mesa
Branch: master
Commit: 369e9272def1d41bec56213512c1966071f54f93
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=369e9272def1d41bec56213512c1966071f54f93
Author: Brian Paul <brianp at vmware.com>
Date: Mon Jul 19 10:50:08 2010 -0600
util: add dummy field to empty structure types
Empty structure types aren't allowed with MSVC.
I haven't tested this change. Hope I haven't broken it...
---
src/gallium/auxiliary/util/u_mempool.c | 2 +-
src/gallium/auxiliary/util/u_mempool.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_mempool.c b/src/gallium/auxiliary/util/u_mempool.c
index da1cc70..c4bb265 100644
--- a/src/gallium/auxiliary/util/u_mempool.c
+++ b/src/gallium/auxiliary/util/u_mempool.c
@@ -30,7 +30,7 @@
#define UTIL_MEMPOOL_MAGIC 0xcafe4321
-struct util_mempool_block_body {};
+struct util_mempool_block_body { char dummy; };
/* The block is either allocated memory or free space. */
struct util_mempool_block {
diff --git a/src/gallium/auxiliary/util/u_mempool.h b/src/gallium/auxiliary/util/u_mempool.h
index b8d2aae..c96f9b6 100644
--- a/src/gallium/auxiliary/util/u_mempool.h
+++ b/src/gallium/auxiliary/util/u_mempool.h
@@ -43,7 +43,7 @@ enum util_mempool_threading {
UTIL_MEMPOOL_MULTITHREADED = TRUE
};
-struct util_mempool_page_body {};
+struct util_mempool_page_body { char dummy; };
/* The page is an array of blocks (allocations). */
struct util_mempool_page {
More information about the mesa-commit
mailing list