Changeset 2256

Show
Ignore:
Timestamp:
04/06/07 00:41:13 (2 years ago)
Author:
proski
Message:

Avoid flexible arrays in structures for gcc-2.95 compatibility

Use zero-length arrays instead. Flexible arrays are more standard, make
sizeof for the structure impossible (which is a good thing) and can be
initialized with a variable mumber of members. But apparently we still
have users with gcc-2.95, and it's the only issue preventing MadWifi
compilation, so it would be better to fix it for now.

We could drop zero-size arrays once Linux 2.4 support is dropped.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/net80211/ieee80211.h

    r2028 r2256  
    359359        u_int8_t id; 
    360360        u_int8_t len; 
    361         u_int8_t info[]; 
     361        u_int8_t info[0]; 
    362362} __packed; 
    363363 
  • trunk/net80211/ieee80211_ioctl.h

    r1856 r2256  
    635635        u_int32_t       app_frmtype;            /* management frame type for which buffer is added */ 
    636636        u_int32_t       app_buflen;             /* application-supplied buffer length */ 
    637         u_int8_t        app_buf[];            /* application-supplied IE(s) */ 
     637        u_int8_t        app_buf[0];           /* application-supplied IE(s) */ 
    638638}; 
    639639