2011/1/18 Johannes Stezenbach <[email protected]>:
> The following compiles cleanly (but not tested):
>
>  /* Link detection routines and table */
>
> +union mii_ifreq {
> +       struct ifreq ifreq;
> +       struct mii_ioctl_data mii;
> +};
> +

Denys has already thought about this solution:
> union {
>       struct ifreq ifreq;
>       struct {
>               char padding[offsetof(struct ifreq, ifr_data)];
>               struct mii_ioctl_data mii;
>       } s;
>} u;

If struct mii_ioctl_data (or union ifr_ifru) was the first element of
struct ifreq you could use this solution, but it wasn't.

Sergey Naumov.
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to