rustdesk: fix for rust 1.65
This commit is contained in:
parent
4b79d6c374
commit
f6c0dcfb9e
2 changed files with 36 additions and 0 deletions
|
@ -38,6 +38,11 @@ rustPlatform.buildRustPackage rec {
|
|||
sha256 = "sha256-IlrfqwNyaSHE9Ct0mn7MUxEg7p1Ku34eOMYelEAYFW8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# based on https://github.com/rustdesk/rustdesk/pull/1900
|
||||
./fix-for-rust-1.65.diff
|
||||
];
|
||||
|
||||
cargoSha256 = "sha256-1OMWEk+DerltF7kwdo4d04rbgIFLHBRq3vZaL7jtrdE=";
|
||||
|
||||
LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib";
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
diff --git a/libs/hbb_common/src/config.rs b/libs/hbb_common/src/config.rs
|
||||
index 74982de5..308bcf80 100644
|
||||
--- a/libs/hbb_common/src/config.rs
|
||||
+++ b/libs/hbb_common/src/config.rs
|
||||
@@ -656,7 +656,7 @@ const PEERS: &str = "peers";
|
||||
|
||||
impl PeerConfig {
|
||||
pub fn load(id: &str) -> PeerConfig {
|
||||
- let _ = CONFIG.read().unwrap(); // for lock
|
||||
+ let _lock = CONFIG.read().unwrap();
|
||||
match confy::load_path(&Self::path(id)) {
|
||||
Ok(config) => config,
|
||||
Err(err) => {
|
||||
@@ -667,7 +667,7 @@ impl PeerConfig {
|
||||
}
|
||||
|
||||
pub fn store(&self, id: &str) {
|
||||
- let _ = CONFIG.read().unwrap(); // for lock
|
||||
+ let _lock = CONFIG.read().unwrap();
|
||||
if let Err(err) = confy::store_path(Self::path(id), self) {
|
||||
log::error!("Failed to store config: {}", err);
|
||||
}
|
||||
@@ -808,7 +808,7 @@ pub struct LanPeers {
|
||||
|
||||
impl LanPeers {
|
||||
pub fn load() -> LanPeers {
|
||||
- let _ = CONFIG.read().unwrap(); // for lock
|
||||
+ let _lock = CONFIG.read().unwrap();
|
||||
match confy::load_path(&Config::file_("_lan_peers")) {
|
||||
Ok(peers) => peers,
|
||||
Err(err) => {
|
Loading…
Reference in a new issue