@@ -173,63 +173,63 @@ macro_rules! ioctl {
173
173
pub unsafe fn $name( fd: $crate:: libc:: c_int,
174
174
data: * mut u8 )
175
175
-> $crate:: Result <$crate:: libc:: c_int> {
176
- convert_ioctl_res!( $crate:: libc:: ioctl( fd, $nr as $crate:: libc :: c_ulong , data) )
176
+ convert_ioctl_res!( $crate:: libc:: ioctl( fd, $nr as $crate:: sys :: ioctl :: ioctl_num_type , data) )
177
177
}
178
178
) ;
179
179
( bad none $name: ident with $nr: expr) => (
180
180
pub unsafe fn $name( fd: $crate:: libc:: c_int)
181
181
-> $crate:: Result <$crate:: libc:: c_int> {
182
- convert_ioctl_res!( $crate:: libc:: ioctl( fd, $nr as $crate:: libc :: c_ulong ) )
182
+ convert_ioctl_res!( $crate:: libc:: ioctl( fd, $nr as $crate:: sys :: ioctl :: ioctl_num_type ) )
183
183
}
184
184
) ;
185
185
( none $name: ident with $ioty: expr, $nr: expr) => (
186
186
pub unsafe fn $name( fd: $crate:: libc:: c_int)
187
187
-> $crate:: Result <$crate:: libc:: c_int> {
188
- convert_ioctl_res!( $crate:: libc:: ioctl( fd, io!( $ioty, $nr) as $crate:: libc :: c_ulong ) )
188
+ convert_ioctl_res!( $crate:: libc:: ioctl( fd, io!( $ioty, $nr) as $crate:: sys :: ioctl :: ioctl_num_type ) )
189
189
}
190
190
) ;
191
191
( read $name: ident with $ioty: expr, $nr: expr; $ty: ty) => (
192
192
pub unsafe fn $name( fd: $crate:: libc:: c_int,
193
193
val: * mut $ty)
194
194
-> $crate:: Result <$crate:: libc:: c_int> {
195
- convert_ioctl_res!( $crate:: libc:: ioctl( fd, ior!( $ioty, $nr, :: std:: mem:: size_of:: <$ty>( ) ) as $crate:: libc :: c_ulong , val) )
195
+ convert_ioctl_res!( $crate:: libc:: ioctl( fd, ior!( $ioty, $nr, :: std:: mem:: size_of:: <$ty>( ) ) as $crate:: sys :: ioctl :: ioctl_num_type , val) )
196
196
}
197
197
) ;
198
198
( write $name: ident with $ioty: expr, $nr: expr; $ty: ty) => (
199
199
pub unsafe fn $name( fd: $crate:: libc:: c_int,
200
200
val: * const $ty)
201
201
-> $crate:: Result <$crate:: libc:: c_int> {
202
- convert_ioctl_res!( $crate:: libc:: ioctl( fd, iow!( $ioty, $nr, :: std:: mem:: size_of:: <$ty>( ) ) as $crate:: libc :: c_ulong , val) )
202
+ convert_ioctl_res!( $crate:: libc:: ioctl( fd, iow!( $ioty, $nr, :: std:: mem:: size_of:: <$ty>( ) ) as $crate:: sys :: ioctl :: ioctl_num_type , val) )
203
203
}
204
204
) ;
205
205
( readwrite $name: ident with $ioty: expr, $nr: expr; $ty: ty) => (
206
206
pub unsafe fn $name( fd: $crate:: libc:: c_int,
207
207
val: * mut $ty)
208
208
-> $crate:: Result <$crate:: libc:: c_int> {
209
- convert_ioctl_res!( $crate:: libc:: ioctl( fd, iorw!( $ioty, $nr, :: std:: mem:: size_of:: <$ty>( ) ) as $crate:: libc :: c_ulong , val) )
209
+ convert_ioctl_res!( $crate:: libc:: ioctl( fd, iorw!( $ioty, $nr, :: std:: mem:: size_of:: <$ty>( ) ) as $crate:: sys :: ioctl :: ioctl_num_type , val) )
210
210
}
211
211
) ;
212
212
( read buf $name: ident with $ioty: expr, $nr: expr; $ty: ty) => (
213
213
pub unsafe fn $name( fd: $crate:: libc:: c_int,
214
214
val: * mut $ty,
215
215
len: usize )
216
216
-> $crate:: Result <$crate:: libc:: c_int> {
217
- convert_ioctl_res!( $crate:: libc:: ioctl( fd, ior!( $ioty, $nr, len) as $crate:: libc :: c_ulong , val) )
217
+ convert_ioctl_res!( $crate:: libc:: ioctl( fd, ior!( $ioty, $nr, len) as $crate:: sys :: ioctl :: ioctl_num_type , val) )
218
218
}
219
219
) ;
220
220
( write buf $name: ident with $ioty: expr, $nr: expr; $ty: ty) => (
221
221
pub unsafe fn $name( fd: $crate:: libc:: c_int,
222
222
val: * const $ty,
223
223
len: usize ) -> $crate:: Result <$crate:: libc:: c_int> {
224
- convert_ioctl_res!( $crate:: libc:: ioctl( fd, iow!( $ioty, $nr, len) as $crate:: libc :: c_ulong , val) )
224
+ convert_ioctl_res!( $crate:: libc:: ioctl( fd, iow!( $ioty, $nr, len) as $crate:: sys :: ioctl :: ioctl_num_type , val) )
225
225
}
226
226
) ;
227
227
( readwrite buf $name: ident with $ioty: expr, $nr: expr; $ty: ty) => (
228
228
pub unsafe fn $name( fd: $crate:: libc:: c_int,
229
229
val: * mut $ty,
230
230
len: usize )
231
231
-> $crate:: Result <$crate:: libc:: c_int> {
232
- convert_ioctl_res!( $crate:: libc:: ioctl( fd, iorw!( $ioty, $nr, len) as $crate:: libc :: c_ulong , val) )
232
+ convert_ioctl_res!( $crate:: libc:: ioctl( fd, iorw!( $ioty, $nr, len) as $crate:: sys :: ioctl :: ioctl_num_type , val) )
233
233
}
234
234
) ;
235
235
}
0 commit comments