aboutsummaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2020-09-22 18:26:53 +0200
committerRobin Krahl <robin.krahl@ireas.org>2020-09-22 18:26:53 +0200
commit4932d2376cc03c64eb82972824be673cdc2e0741 (patch)
treed1690533683e8fe33be00e4b1eb32f9363f207b4 /patches
parent7944af959ca0b48f0e8ea5c506e801e07a6b8124 (diff)
downloadnitrokey-sys-rs-4932d2376cc03c64eb82972824be673cdc2e0741.tar.gz
nitrokey-sys-rs-4932d2376cc03c64eb82972824be673cdc2e0741.tar.bz2
Do not include layout tests in generated bindings
We are generating the Rust bindings in src/ffi.rs using bindgen once for all platforms on an amd64 machine. These bindings previously included layout tests. But these tests fail on some 32-bit architecture. See this discussion for more information: https://lists.sr.ht/~ireas/nitrokey-rs-dev/%3C20200919182408.GA1513%40ireas.org%3E With this patch, we remove the layout tests from the generated bindings. Instead, we will add the option to re-generate the bindings, including the layout tests, during the build in the next patch.
Diffstat (limited to 'patches')
-rw-r--r--patches/deprecated.diff8
1 files changed, 4 insertions, 4 deletions
diff --git a/patches/deprecated.diff b/patches/deprecated.diff
index 79fe5ba..e13f90f 100644
--- a/patches/deprecated.diff
+++ b/patches/deprecated.diff
@@ -6,7 +6,7 @@ Index: nitrokey-sys-rs/src/ffi.rs
===================================================================
--- nitrokey-sys-rs.orig/src/ffi.rs
+++ nitrokey-sys-rs/src/ffi.rs
-@@ -848,6 +848,7 @@ extern "C" {
+@@ -212,6 +212,7 @@ extern "C" {
#[doc = " deprecated in favor of NK_get_status_as_string."]
#[doc = " @return string representation of the status or an empty string"]
#[doc = " if the command failed"]
@@ -14,7 +14,7 @@ Index: nitrokey-sys-rs/src/ffi.rs
pub fn NK_status() -> *mut ::std::os::raw::c_char;
}
extern "C" {
-@@ -1134,6 +1135,7 @@ extern "C" {
+@@ -498,6 +499,7 @@ extern "C" {
pub fn NK_totp_set_time_soft(time: u64) -> ::std::os::raw::c_int;
}
extern "C" {
@@ -22,7 +22,7 @@ Index: nitrokey-sys-rs/src/ffi.rs
pub fn NK_totp_get_time() -> ::std::os::raw::c_int;
}
extern "C" {
-@@ -1309,6 +1311,7 @@ extern "C" {
+@@ -673,6 +675,7 @@ extern "C" {
#[doc = " Storage only"]
#[doc = " @param user_pin 20 characters User PIN"]
#[doc = " @return command processing error code"]
@@ -30,7 +30,7 @@ Index: nitrokey-sys-rs/src/ffi.rs
pub fn NK_set_unencrypted_read_only(
user_pin: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
-@@ -1322,6 +1325,7 @@ extern "C" {
+@@ -686,6 +689,7 @@ extern "C" {
#[doc = " Storage only"]
#[doc = " @param user_pin 20 characters User PIN"]
#[doc = " @return command processing error code"]