aboutsummaryrefslogtreecommitdiff
path: root/patches/deprecated.diff
blob: dff4b55bfadd985ff85265d5063cf108173548aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Add deprecated attribute to depracted functions

bindgen does add the deprecated attribute to deprecated functions.  This patch
manually adds the attributes libnitrokey’s deprecated functions.
Index: nitrokey-sys-rs/src/ffi.rs
===================================================================
--- nitrokey-sys-rs.orig/src/ffi.rs
+++ nitrokey-sys-rs/src/ffi.rs
@@ -763,6 +763,7 @@ extern "C" {
     /// deprecated in favor of NK_get_status_as_string.
     /// @return string representation of the status or an empty string
     /// if the command failed
+    #[deprecated(since = "3.5.0", note="use `NK_get_status_as_string` instead")]
     pub fn NK_status() -> *mut ::std::os::raw::c_char;
 }
 extern "C" {
@@ -1017,6 +1018,7 @@ extern "C" {
     pub fn NK_totp_set_time_soft(time: u64) -> ::std::os::raw::c_int;
 }
 extern "C" {
+    #[deprecated(since = "3.4.0", note="use `NK_totp_set_time_soft` instead")]
     pub fn NK_totp_get_time() -> ::std::os::raw::c_int;
 }
 extern "C" {