Fix build with gcc, do not use unnamed union.

Reported and tested by:	gjb
MFC after:	1 month
This commit is contained in:
Konstantin Belousov 2013-03-05 16:15:34 +00:00
parent 94415dd90e
commit 257d427d5f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=247849

View File

@ -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