-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unnecessary __uint*_t typedefs
While bindgen is able to replace the C uint types with the correct Rust types, it still generates typedefs for __uint{8,16,32,64}_t [0]. We don’t need these typedefs, so we add a patch to remove them. [0] rust-lang/rust-bindgen#1663
- Loading branch information
1 parent
2b367a3
commit 90bcfc8
Showing
3 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Remove uint type definitions | ||
|
||
While bindgen is able to replace the C uint types with the correct Rust types, | ||
it still generates typedefs for __uint{8,16,32,64}_t [0]. We don’t need these | ||
typedefs, so we remove them manually. | ||
|
||
[0] https://github.com/rust-lang/rust-bindgen/issues/1663 | ||
Index: nitrokey-sys-rs/src/ffi.rs | ||
=================================================================== | ||
--- nitrokey-sys-rs.orig/src/ffi.rs | ||
+++ nitrokey-sys-rs/src/ffi.rs | ||
@@ -1,9 +1,5 @@ | ||
/* automatically generated by rust-bindgen */ | ||
|
||
-pub type __uint8_t = ::std::os::raw::c_uchar; | ||
-pub type __uint16_t = ::std::os::raw::c_ushort; | ||
-pub type __uint32_t = ::std::os::raw::c_uint; | ||
-pub type __uint64_t = ::std::os::raw::c_ulong; | ||
extern "C" { | ||
#[link_name = "\u{1}NK_PWS_SLOT_COUNT"] | ||
pub static mut NK_PWS_SLOT_COUNT: u8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
deprecated.diff | ||
remove-uint.diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters