diff options
| author | Changli Gao <xiaosuo@gmail.com> | 2010-08-22 13:25:05 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2010-08-23 00:15:39 -0400 |
| commit | 09cd2b99c6cdd1e14e84c1febca2fb91e9f4e5ba (patch) | |
| tree | 87d9c912d5d73a1017773a5b0d30d564e8a7895c /include/linux/if_pppox.h | |
| parent | 48d3ff82698cb0094684aed70446e0a5cbb1a4d0 (diff) | |
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>
Diffstat (limited to 'include/linux/if_pppox.h')
| -rw-r--r-- | include/linux/if_pppox.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h index 1925e0c3f162..27741e05446f 100644 --- a/include/linux/if_pppox.h +++ b/include/linux/if_pppox.h | |||
| @@ -59,7 +59,7 @@ struct sockaddr_pppox { | |||
| 59 | union{ | 59 | union{ |
| 60 | struct pppoe_addr pppoe; | 60 | struct pppoe_addr pppoe; |
| 61 | }sa_addr; | 61 | }sa_addr; |
| 62 | } __packed; | 62 | } __attribute__((packed)); |
| 63 | 63 | ||
| 64 | /* The use of the above union isn't viable because the size of this | 64 | /* The use of the above union isn't viable because the size of this |
| 65 | * struct must stay fixed over time -- applications use sizeof(struct | 65 | * struct must stay fixed over time -- applications use sizeof(struct |
| @@ -70,7 +70,7 @@ struct sockaddr_pppol2tp { | |||
| 70 | sa_family_t sa_family; /* address family, AF_PPPOX */ | 70 | sa_family_t sa_family; /* address family, AF_PPPOX */ |
| 71 | unsigned int sa_protocol; /* protocol identifier */ | 71 | unsigned int sa_protocol; /* protocol identifier */ |
| 72 | struct pppol2tp_addr pppol2tp; | 72 | struct pppol2tp_addr pppol2tp; |
| 73 | } __packed; | 73 | } __attribute__((packed)); |
| 74 | 74 | ||
| 75 | /* The L2TPv3 protocol changes tunnel and session ids from 16 to 32 | 75 | /* The L2TPv3 protocol changes tunnel and session ids from 16 to 32 |
| 76 | * bits. So we need a different sockaddr structure. | 76 | * bits. So we need a different sockaddr structure. |
| @@ -79,7 +79,7 @@ struct sockaddr_pppol2tpv3 { | |||
| 79 | sa_family_t sa_family; /* address family, AF_PPPOX */ | 79 | sa_family_t sa_family; /* address family, AF_PPPOX */ |
| 80 | unsigned int sa_protocol; /* protocol identifier */ | 80 | unsigned int sa_protocol; /* protocol identifier */ |
| 81 | struct pppol2tpv3_addr pppol2tp; | 81 | struct pppol2tpv3_addr pppol2tp; |
| 82 | } __packed; | 82 | } __attribute__((packed)); |
| 83 | 83 | ||
| 84 | /********************************************************************* | 84 | /********************************************************************* |
| 85 | * | 85 | * |
| @@ -101,7 +101,7 @@ struct pppoe_tag { | |||
| 101 | __be16 tag_type; | 101 | __be16 tag_type; |
| 102 | __be16 tag_len; | 102 | __be16 tag_len; |
| 103 | char tag_data[0]; | 103 | char tag_data[0]; |
| 104 | } __attribute ((packed)); | 104 | } __attribute__ ((packed)); |
| 105 | 105 | ||
| 106 | /* Tag identifiers */ | 106 | /* Tag identifiers */ |
| 107 | #define PTT_EOL __cpu_to_be16(0x0000) | 107 | #define PTT_EOL __cpu_to_be16(0x0000) |
| @@ -129,7 +129,7 @@ struct pppoe_hdr { | |||
| 129 | __be16 sid; | 129 | __be16 sid; |
| 130 | __be16 length; | 130 | __be16 length; |
| 131 | struct pppoe_tag tag[0]; | 131 | struct pppoe_tag tag[0]; |
| 132 | } __packed; | 132 | } __attribute__((packed)); |
| 133 | 133 | ||
| 134 | /* Length of entire PPPoE + PPP header */ | 134 | /* Length of entire PPPoE + PPP header */ |
| 135 | #define PPPOE_SES_HLEN 8 | 135 | #define PPPOE_SES_HLEN 8 |
