diff --git a/include/nuttx/net/netdev.h b/include/nuttx/net/netdev.h index 2affc202eb..98b57edf97 100644 --- a/include/nuttx/net/netdev.h +++ b/include/nuttx/net/netdev.h @@ -258,21 +258,25 @@ struct net_driver_s /* Link layer address */ +#if defined(CONFIG_NET_ETHERNET) || defined(CONFIG_NET_6LOWPAN) || \ + defined(CONFIG_NET_BLUETOOTH) || defined(CONFIG_NET_IEEE802154) || \ + defined(CONFIG_NET_TUN) union { -#ifdef CONFIG_NET_ETHERNET +# if defined(CONFIG_NET_ETHERNET) || defined(CONFIG_NET_TUN) /* Ethernet device identity */ struct ether_addr ether; /* Device Ethernet MAC address */ -#endif +# endif -#if defined(CONFIG_NET_6LOWPAN) || defined(CONFIG_NET_BLUETOOTH) || \ +# if defined(CONFIG_NET_6LOWPAN) || defined(CONFIG_NET_BLUETOOTH) || \ defined(CONFIG_NET_IEEE802154) /* The address assigned to an IEEE 802.15.4 or generic packet radio. */ struct netdev_varaddr_s radio; -#endif +# endif } d_mac; +#endif /* Network identity */ diff --git a/include/nuttx/spinlock.h b/include/nuttx/spinlock.h index af074e0728..544352ef53 100644 --- a/include/nuttx/spinlock.h +++ b/include/nuttx/spinlock.h @@ -33,9 +33,7 @@ #include #ifndef CONFIG_SPINLOCK -typedef struct -{ -} spinlock_t; +typedef uint8_t spinlock_t; #else /* The architecture specific spinlock.h header file must also provide the