@@ -126,7 +126,7 @@ impl Keyring {
126
126
127
127
fn get_keyring ( id : SpecialKeyring , create : bool ) -> Result < Keyring > {
128
128
let res = unsafe { keyctl_get_keyring_ID ( id. serial ( ) , create as libc:: c_int ) } ;
129
- check_call ( res as libc :: c_long , Keyring :: new_impl ( res) )
129
+ check_call ( i64 :: from ( res ) , Keyring :: new_impl ( res) )
130
130
}
131
131
132
132
/// Attach to a special keyring. Fails if the keyring does not already exist.
@@ -142,7 +142,7 @@ impl Keyring {
142
142
/// Create a new anonymous keyring and set it as the session keyring.
143
143
pub fn join_anonymous_session ( ) -> Result < Self > {
144
144
let res = unsafe { keyctl_join_session_keyring ( ptr:: null ( ) ) } ;
145
- check_call ( res as libc :: c_long , Keyring :: new_impl ( res) )
145
+ check_call ( i64 :: from ( res ) , Keyring :: new_impl ( res) )
146
146
}
147
147
148
148
/// Attached to a named session keyring.
@@ -154,7 +154,7 @@ impl Keyring {
154
154
{
155
155
let name_cstr = CString :: new ( name. as_ref ( ) ) . unwrap ( ) ;
156
156
let res = unsafe { keyctl_join_session_keyring ( name_cstr. as_ptr ( ) ) } ;
157
- check_call ( res as libc :: c_long , Keyring :: new_impl ( res) )
157
+ check_call ( i64 :: from ( res ) , Keyring :: new_impl ( res) )
158
158
}
159
159
160
160
/// Clears the contents of the keyring.
@@ -286,7 +286,7 @@ impl Keyring {
286
286
payload. len ( ) ,
287
287
self . id )
288
288
} ;
289
- check_call ( res as libc :: c_long , Key :: new_impl ( res) )
289
+ check_call ( i64 :: from ( res ) , Key :: new_impl ( res) )
290
290
}
291
291
292
292
/// Adds a keyring to the current keyring.
@@ -316,7 +316,7 @@ impl Keyring {
316
316
where D : AsRef < str > ,
317
317
{
318
318
let res = self . request_impl ( "user" , description. as_ref ( ) ) ?;
319
- check_call ( res as libc :: c_long , Key :: new_impl ( res) )
319
+ check_call ( i64 :: from ( res ) , Key :: new_impl ( res) )
320
320
}
321
321
322
322
/// Requests a keyring with the given description by searching the thread, process, and session
@@ -327,7 +327,7 @@ impl Keyring {
327
327
where D : AsRef < str > ,
328
328
{
329
329
let res = self . request_impl ( "keyring" , description. as_ref ( ) ) ?;
330
- check_call ( res as libc :: c_long , Keyring :: new_impl ( res) )
330
+ check_call ( i64 :: from ( res ) , Keyring :: new_impl ( res) )
331
331
}
332
332
333
333
fn request_fallback_impl ( & self , type_ : & str , description : & str , info : & str ) -> Result < KeyringSerial > {
@@ -353,7 +353,7 @@ impl Keyring {
353
353
I : AsRef < str > ,
354
354
{
355
355
let res = self . request_fallback_impl ( "user" , description. as_ref ( ) , info. as_ref ( ) ) ?;
356
- check_call ( res as libc :: c_long , Key :: new_impl ( res) )
356
+ check_call ( i64 :: from ( res ) , Key :: new_impl ( res) )
357
357
}
358
358
359
359
/// Requests a keyring with the given description by searching the thread, process, and session
@@ -367,7 +367,7 @@ impl Keyring {
367
367
I : AsRef < str > ,
368
368
{
369
369
let res = self . request_fallback_impl ( "keyring" , description. as_ref ( ) , info. as_ref ( ) ) ?;
370
- check_call ( res as libc :: c_long , Keyring :: new_impl ( res) )
370
+ check_call ( i64 :: from ( res ) , Keyring :: new_impl ( res) )
371
371
}
372
372
373
373
/// Revokes the keyring.
@@ -478,7 +478,7 @@ impl Key {
478
478
/// keyrings.
479
479
pub fn request_key_auth_key ( create : bool ) -> Result < Self > {
480
480
let res = unsafe { keyctl_get_keyring_ID ( KEY_SPEC_REQKEY_AUTH_KEY , create as libc:: c_int ) } ;
481
- check_call ( res as libc :: c_long , Key :: new_impl ( res) )
481
+ check_call ( i64 :: from ( res ) , Key :: new_impl ( res) )
482
482
}
483
483
484
484
/// Requests a key with the given description by searching the thread, process, and session
0 commit comments