summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-03-05 16:15:34 +0000
committerkib <kib@FreeBSD.org>2013-03-05 16:15:34 +0000
commit98d6a311d1e3a60d97a5688b8af29be7dbb867d1 (patch)
tree6fdf1e93ba86b6b95ffd97977912cd9357bae3eb
parent1a0feca1fa0b920ed9458e818fd0e5e02278c4ff (diff)
downloadFreeBSD-src-98d6a311d1e3a60d97a5688b8af29be7dbb867d1.zip
FreeBSD-src-98d6a311d1e3a60d97a5688b8af29be7dbb867d1.tar.gz
Fix build with gcc, do not use unnamed union.
Reported and tested by: gjb MFC after: 1 month
-rw-r--r--sys/dev/drm2/ttm/ttm_page_alloc.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/sys/dev/drm2/ttm/ttm_page_alloc.c b/sys/dev/drm2/ttm/ttm_page_alloc.c
index ffc8483..9a30a46 100644
--- a/sys/dev/drm2/ttm/ttm_page_alloc.c
+++ b/sys/dev/drm2/ttm/ttm_page_alloc.c
@@ -113,16 +113,22 @@ struct ttm_pool_manager {
struct ttm_pool_opts options;
union {
- struct ttm_page_pool pools[NUM_POOLS];
- struct {
- struct ttm_page_pool wc_pool;
- struct ttm_page_pool uc_pool;
- struct ttm_page_pool wc_pool_dma32;
- struct ttm_page_pool uc_pool_dma32;
- } ;
- };
+ struct ttm_page_pool u_pools[NUM_POOLS];
+ struct _utag {
+ struct ttm_page_pool u_wc_pool;
+ struct ttm_page_pool u_uc_pool;
+ struct ttm_page_pool u_wc_pool_dma32;
+ struct ttm_page_pool u_uc_pool_dma32;
+ } _ut;
+ } _u;
};
+#define pools _u.u_pools
+#define wc_pool _u._ut.u_wc_pool
+#define uc_pool _u._ut.u_uc_pool
+#define wc_pool_dma32 _u._ut.u_wc_pool_dma32
+#define uc_pool_dma32 _u._ut.u_uc_pool_dma32
+
MALLOC_DEFINE(M_TTM_POOLMGR, "ttm_poolmgr", "TTM Pool Manager");
static void
OpenPOWER on IntegriCloud