diff options
Diffstat (limited to 'include/linux/compat.h')
-rw-r--r-- | include/linux/compat.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h index af931ee43dd8..717c691ecd8e 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -10,6 +10,8 @@ | |||
10 | #include <linux/stat.h> | 10 | #include <linux/stat.h> |
11 | #include <linux/param.h> /* for HZ */ | 11 | #include <linux/param.h> /* for HZ */ |
12 | #include <linux/sem.h> | 12 | #include <linux/sem.h> |
13 | #include <linux/socket.h> | ||
14 | #include <linux/if.h> | ||
13 | 15 | ||
14 | #include <asm/compat.h> | 16 | #include <asm/compat.h> |
15 | #include <asm/siginfo.h> | 17 | #include <asm/siginfo.h> |
@@ -21,6 +23,7 @@ | |||
21 | typedef __compat_uid32_t compat_uid_t; | 23 | typedef __compat_uid32_t compat_uid_t; |
22 | typedef __compat_gid32_t compat_gid_t; | 24 | typedef __compat_gid32_t compat_gid_t; |
23 | 25 | ||
26 | struct compat_sel_arg_struct; | ||
24 | struct rusage; | 27 | struct rusage; |
25 | 28 | ||
26 | struct compat_itimerspec { | 29 | struct compat_itimerspec { |
@@ -154,6 +157,48 @@ typedef struct compat_sigevent { | |||
154 | } _sigev_un; | 157 | } _sigev_un; |
155 | } compat_sigevent_t; | 158 | } compat_sigevent_t; |
156 | 159 | ||
160 | struct compat_ifmap { | ||
161 | compat_ulong_t mem_start; | ||
162 | compat_ulong_t mem_end; | ||
163 | unsigned short base_addr; | ||
164 | unsigned char irq; | ||
165 | unsigned char dma; | ||
166 | unsigned char port; | ||
167 | }; | ||
168 | |||
169 | struct compat_if_settings | ||
170 | { | ||
171 | unsigned int type; /* Type of physical device or protocol */ | ||
172 | unsigned int size; /* Size of the data allocated by the caller */ | ||
173 | compat_uptr_t ifs_ifsu; /* union of pointers */ | ||
174 | }; | ||
175 | |||
176 | struct compat_ifreq { | ||
177 | union { | ||
178 | char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */ | ||
179 | } ifr_ifrn; | ||
180 | union { | ||
181 | struct sockaddr ifru_addr; | ||
182 | struct sockaddr ifru_dstaddr; | ||
183 | struct sockaddr ifru_broadaddr; | ||
184 | struct sockaddr ifru_netmask; | ||
185 | struct sockaddr ifru_hwaddr; | ||
186 | short ifru_flags; | ||
187 | compat_int_t ifru_ivalue; | ||
188 | compat_int_t ifru_mtu; | ||
189 | struct compat_ifmap ifru_map; | ||
190 | char ifru_slave[IFNAMSIZ]; /* Just fits the size */ | ||
191 | char ifru_newname[IFNAMSIZ]; | ||
192 | compat_caddr_t ifru_data; | ||
193 | struct compat_if_settings ifru_settings; | ||
194 | } ifr_ifru; | ||
195 | }; | ||
196 | |||
197 | struct compat_ifconf { | ||
198 | compat_int_t ifc_len; /* size of buffer */ | ||
199 | compat_caddr_t ifcbuf; | ||
200 | }; | ||
201 | |||
157 | struct compat_robust_list { | 202 | struct compat_robust_list { |
158 | compat_uptr_t next; | 203 | compat_uptr_t next; |
159 | }; | 204 | }; |
@@ -205,6 +250,8 @@ asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp, | |||
205 | compat_ulong_t __user *outp, compat_ulong_t __user *exp, | 250 | compat_ulong_t __user *outp, compat_ulong_t __user *exp, |
206 | struct compat_timeval __user *tvp); | 251 | struct compat_timeval __user *tvp); |
207 | 252 | ||
253 | asmlinkage long compat_sys_old_select(struct compat_sel_arg_struct __user *arg); | ||
254 | |||
208 | asmlinkage long compat_sys_wait4(compat_pid_t pid, | 255 | asmlinkage long compat_sys_wait4(compat_pid_t pid, |
209 | compat_uint_t __user *stat_addr, int options, | 256 | compat_uint_t __user *stat_addr, int options, |
210 | struct compat_rusage __user *ru); | 257 | struct compat_rusage __user *ru); |