@@ -94,7 +94,7 @@ impl<'a> AioCb<'a> {
94
94
/// be prioritized at the process's priority level minus `prio`
95
95
/// * `sigev_notify` Determines how you will be notified of event
96
96
/// completion.
97
- pub fn from_fd ( fd : RawFd , prio : :: c_int ,
97
+ pub fn from_fd ( fd : RawFd , prio : libc :: c_int ,
98
98
sigev_notify : SigevNotify ) -> AioCb < ' a > {
99
99
let mut a = AioCb :: common_init ( fd, prio, sigev_notify) ;
100
100
a. aio_offset = 0 ;
@@ -118,13 +118,13 @@ impl<'a> AioCb<'a> {
118
118
/// * `opcode` This field is only used for `lio_listio`. It determines
119
119
/// which operation to use for this individual aiocb
120
120
pub fn from_mut_slice ( fd : RawFd , offs : off_t , buf : & ' a mut [ u8 ] ,
121
- prio : :: c_int , sigev_notify : SigevNotify ,
121
+ prio : libc :: c_int , sigev_notify : SigevNotify ,
122
122
opcode : LioOpcode ) -> AioCb < ' a > {
123
123
let mut a = AioCb :: common_init ( fd, prio, sigev_notify) ;
124
124
a. aio_offset = offs;
125
125
a. aio_nbytes = buf. len ( ) as size_t ;
126
126
a. aio_buf = buf. as_ptr ( ) as * mut c_void ;
127
- a. aio_lio_opcode = opcode as :: c_int ;
127
+ a. aio_lio_opcode = opcode as libc :: c_int ;
128
128
129
129
let aiocb = AioCb { aiocb : a, mutable : true , in_progress : false ,
130
130
keeper : Keeper :: phantom ( PhantomData ) } ;
@@ -146,13 +146,13 @@ impl<'a> AioCb<'a> {
146
146
/// * `opcode` This field is only used for `lio_listio`. It determines
147
147
/// which operation to use for this individual aiocb
148
148
pub fn from_boxed_slice ( fd : RawFd , offs : off_t , buf : Rc < Box < [ u8 ] > > ,
149
- prio : :: c_int , sigev_notify : SigevNotify ,
149
+ prio : libc :: c_int , sigev_notify : SigevNotify ,
150
150
opcode : LioOpcode ) -> AioCb < ' a > {
151
151
let mut a = AioCb :: common_init ( fd, prio, sigev_notify) ;
152
152
a. aio_offset = offs;
153
153
a. aio_nbytes = buf. len ( ) as size_t ;
154
154
a. aio_buf = buf. as_ptr ( ) as * mut c_void ;
155
- a. aio_lio_opcode = opcode as :: c_int ;
155
+ a. aio_lio_opcode = opcode as libc :: c_int ;
156
156
157
157
let aiocb = AioCb { aiocb : a, mutable : true , in_progress : false ,
158
158
keeper : Keeper :: boxed ( buf) } ;
@@ -173,7 +173,7 @@ impl<'a> AioCb<'a> {
173
173
// AioCb, and they must all be the same type. We're basically stuck with
174
174
// using an unsafe function, since aio (as designed in C) is an unsafe API.
175
175
pub fn from_slice ( fd : RawFd , offs : off_t , buf : & ' a [ u8 ] ,
176
- prio : :: c_int , sigev_notify : SigevNotify ,
176
+ prio : libc :: c_int , sigev_notify : SigevNotify ,
177
177
opcode : LioOpcode ) -> AioCb {
178
178
let mut a = AioCb :: common_init ( fd, prio, sigev_notify) ;
179
179
a. aio_offset = offs;
@@ -183,14 +183,14 @@ impl<'a> AioCb<'a> {
183
183
// it.
184
184
a. aio_buf = buf. as_ptr ( ) as * mut c_void ;
185
185
assert ! ( opcode != LioOpcode :: LIO_READ , "Can't read into an immutable buffer" ) ;
186
- a. aio_lio_opcode = opcode as :: c_int ;
186
+ a. aio_lio_opcode = opcode as libc :: c_int ;
187
187
188
188
let aiocb = AioCb { aiocb : a, mutable : false , in_progress : false ,
189
189
keeper : Keeper :: none} ;
190
190
aiocb
191
191
}
192
192
193
- fn common_init ( fd : RawFd , prio : :: c_int ,
193
+ fn common_init ( fd : RawFd , prio : libc :: c_int ,
194
194
sigev_notify : SigevNotify ) -> libc:: aiocb {
195
195
// Use mem::zeroed instead of explicitly zeroing each field, because the
196
196
// number and name of reserved fields is OS-dependent. On some OSes,
@@ -235,7 +235,7 @@ impl<'a> AioCb<'a> {
235
235
pub fn fsync ( & mut self , mode : AioFsyncMode ) -> Result < ( ) > {
236
236
let p: * mut libc:: aiocb = & mut self . aiocb ;
237
237
self . in_progress = true ;
238
- Errno :: result ( unsafe { libc:: aio_fsync ( mode as :: c_int , p) } ) . map ( drop)
238
+ Errno :: result ( unsafe { libc:: aio_fsync ( mode as libc :: c_int , p) } ) . map ( drop)
239
239
}
240
240
241
241
/// Asynchronously reads from a file descriptor into a buffer
0 commit comments