Print this page
3373 gcc >= 4.5 concerns about offsetof()
Portions contributed by: Igor Pashev <pashev.igor@gmail.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/xen/io/xnb.h
          +++ new/usr/src/uts/common/xen/io/xnb.h
↓ open down ↓ 26 lines elided ↑ open up ↑
  27   27   */
  28   28  
  29   29  #ifndef _SYS_XNB_H
  30   30  #define _SYS_XNB_H
  31   31  
  32   32  #include <sys/types.h>
  33   33  #include <sys/kstat.h>
  34   34  #include <sys/stream.h>
  35   35  #include <sys/ethernet.h>
  36   36  #include <sys/hypervisor.h>
       37 +#include <sys/sysmacros.h>
  37   38  #include <xen/public/io/netif.h>
  38   39  
  39   40  #ifdef __cplusplus
  40   41  extern "C" {
  41   42  #endif
  42   43  
  43      -#define NET_TX_RING_SIZE  __RING_SIZE((netif_tx_sring_t *)0, PAGESIZE)
  44      -#define NET_RX_RING_SIZE  __RING_SIZE((netif_rx_sring_t *)0, PAGESIZE)
       44 +#define NET_TX_RING_SIZE  __CONST_RING_SIZE(netif_tx, PAGESIZE)
       45 +#define NET_RX_RING_SIZE  __CONST_RING_SIZE(netif_rx, PAGESIZE)
  45   46  
  46   47  #define XNBMAXPKT       1500            /* MTU size */
  47   48  
  48   49  /* DEBUG flags */
  49   50  #define XNBDDI          0x01
  50   51  #define XNBTRACE        0x02
  51   52  #define XNBSEND         0x04
  52   53  #define XNBRECV         0x08
  53   54  #define XNBINTR         0x10
  54   55  #define XNBRING         0x20
↓ open down ↓ 161 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX