debuggers.hg

changeset 22724:52b57a4781b4

minios: use constant expression to size arrays

Fixes a compile error in gcc-4.5 which is the reason __CONST_RING_SIZE()
was introduced. Let's just use it in minios netfront.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Gianni Tedesco <gianni.tedesco@citrix.com>
date Fri Jan 07 18:01:18 2011 +0000 (2011-01-07)
parents 7932a9452b4f
children e1392f5327ce
files extras/mini-os/netfront.c
line diff
     1.1 --- a/extras/mini-os/netfront.c	Fri Jan 07 16:59:53 2011 +0000
     1.2 +++ b/extras/mini-os/netfront.c	Fri Jan 07 18:01:18 2011 +0000
     1.3 @@ -25,8 +25,8 @@ DECLARE_WAIT_QUEUE_HEAD(netfront_queue);
     1.4  
     1.5  
     1.6  
     1.7 -#define NET_TX_RING_SIZE __RING_SIZE((struct netif_tx_sring *)0, PAGE_SIZE)
     1.8 -#define NET_RX_RING_SIZE __RING_SIZE((struct netif_rx_sring *)0, PAGE_SIZE)
     1.9 +#define NET_TX_RING_SIZE __CONST_RING_SIZE(netif_tx, PAGE_SIZE)
    1.10 +#define NET_RX_RING_SIZE __CONST_RING_SIZE(netif_rx, PAGE_SIZE)
    1.11  #define GRANT_INVALID_REF 0
    1.12  
    1.13