Author: kib
Date: Tue Mar  5 16:15:34 2013
New Revision: 247849
URL: http://svnweb.freebsd.org/changeset/base/247849

Log:
  Fix build with gcc, do not use unnamed union.
  
  Reported and tested by:       gjb
  MFC after:    1 month

Modified:
  head/sys/dev/drm2/ttm/ttm_page_alloc.c

Modified: head/sys/dev/drm2/ttm/ttm_page_alloc.c
==============================================================================
--- head/sys/dev/drm2/ttm/ttm_page_alloc.c      Tue Mar  5 16:14:55 2013        
(r247848)
+++ head/sys/dev/drm2/ttm/ttm_page_alloc.c      Tue Mar  5 16:15:34 2013        
(r247849)
@@ -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
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to