aboutsummaryrefslogtreecommitdiff
path: root/patches/remove-uint.diff
blob: 2db1d95229059fb18dbc4b681b7a2b970bb67477 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;