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