From e9a06bb9a2802a5ae6011fcd96cf54e1cfc7d311 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Sun, 20 Sep 2020 05:01:06 +0200 Subject: Derive Default for libnitrokey structs This patch adds the --with-derive-default option to the bindgen invocation so that it derives Default implementations for all libnitrokey structs. This allows us to simplify code in nitrokey-rs, for example the initialization of structs that are used in nitrokey-sys functions with output parameters. --- patches/deprecated.diff | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'patches') diff --git a/patches/deprecated.diff b/patches/deprecated.diff index a7d2359..c814812 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 -@@ -762,6 +762,7 @@ extern "C" { +@@ -767,6 +767,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" { -@@ -1017,6 +1018,7 @@ extern "C" { +@@ -1022,6 +1023,7 @@ extern "C" { pub fn NK_totp_set_time_soft(time: u64) -> ::std::os::raw::c_int; } extern "C" { -- cgit v1.2.1