mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
header: fix broken headers for user space
__packed is only defined in kernel space, so we should use __attribute__((packed)) for the code shared between kernel and user space. Two __attribute() annotations are replaced with __attribute__() too. Signed-off-by: Changli Gao <xiaosuo@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
48d3ff8269
commit
09cd2b99c6
10 changed files with 26 additions and 26 deletions
|
@ -67,7 +67,7 @@ struct fddi_8022_1_hdr {
|
|||
__u8 dsap; /* destination service access point */
|
||||
__u8 ssap; /* source service access point */
|
||||
__u8 ctrl; /* control byte #1 */
|
||||
} __packed;
|
||||
} __attribute__((packed));
|
||||
|
||||
/* Define 802.2 Type 2 header */
|
||||
struct fddi_8022_2_hdr {
|
||||
|
@ -75,7 +75,7 @@ struct fddi_8022_2_hdr {
|
|||
__u8 ssap; /* source service access point */
|
||||
__u8 ctrl_1; /* control byte #1 */
|
||||
__u8 ctrl_2; /* control byte #2 */
|
||||
} __packed;
|
||||
} __attribute__((packed));
|
||||
|
||||
/* Define 802.2 SNAP header */
|
||||
#define FDDI_K_OUI_LEN 3
|
||||
|
@ -85,7 +85,7 @@ struct fddi_snap_hdr {
|
|||
__u8 ctrl; /* always 0x03 */
|
||||
__u8 oui[FDDI_K_OUI_LEN]; /* organizational universal id */
|
||||
__be16 ethertype; /* packet type ID field */
|
||||
} __packed;
|
||||
} __attribute__((packed));
|
||||
|
||||
/* Define FDDI LLC frame header */
|
||||
struct fddihdr {
|
||||
|
@ -98,7 +98,7 @@ struct fddihdr {
|
|||
struct fddi_8022_2_hdr llc_8022_2;
|
||||
struct fddi_snap_hdr llc_snap;
|
||||
} hdr;
|
||||
} __packed;
|
||||
} __attribute__((packed));
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/netdevice.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue