4f75cf25fd
```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
50 lines
1.5 KiB
Diff
50 lines
1.5 KiB
Diff
commit 62d3567c42de318da828149759c6bb2f71c13de7
|
|
Author: q66 <daniel@octaforge.org>
|
|
Date: Wed Mar 10 22:52:10 2021 +0100
|
|
|
|
fix AtomicU64 in jsonrpc (breaks build on ppc32)
|
|
|
|
diff --git crates/jsonrpc/src/client.rs crates/jsonrpc/src/client.rs
|
|
index 7d71428..3245e24 100644
|
|
--- a/crates/jsonrpc/src/client.rs
|
|
+++ b/crates/jsonrpc/src/client.rs
|
|
@@ -7,7 +7,7 @@ use futures::{
|
|
};
|
|
use serde::Serialize;
|
|
use serde_json::json;
|
|
-use std::sync::atomic::{AtomicU64, Ordering};
|
|
+use std::sync::atomic::{AtomicUsize, Ordering};
|
|
|
|
pub type Result<T> = std::result::Result<T, Error>;
|
|
|
|
@@ -19,7 +19,7 @@ pub trait ResponseHandler {
|
|
#[derive(Debug)]
|
|
pub struct Client {
|
|
output: mpsc::Sender<String>,
|
|
- request_id: AtomicU64,
|
|
+ request_id: AtomicUsize,
|
|
senders_by_id: CHashMap<Id, oneshot::Sender<Result<serde_json::Value>>>,
|
|
}
|
|
|
|
@@ -27,7 +27,7 @@ impl Client {
|
|
pub fn new(output: mpsc::Sender<String>) -> Self {
|
|
Self {
|
|
output,
|
|
- request_id: AtomicU64::new(0),
|
|
+ request_id: AtomicUsize::new(0),
|
|
senders_by_id: CHashMap::new(),
|
|
}
|
|
}
|
|
diff --git crates/jsonrpc/src/types.rs crates/jsonrpc/src/types.rs
|
|
index 30036d1..c1a2dce 100644
|
|
--- a/crates/jsonrpc/src/types.rs
|
|
+++ b/crates/jsonrpc/src/types.rs
|
|
@@ -6,7 +6,7 @@ pub const PROTOCOL_VERSION: &str = "2.0";
|
|
#[derive(Debug, Eq, Hash, PartialEq, Clone, Deserialize, Serialize)]
|
|
#[serde(untagged)]
|
|
pub enum Id {
|
|
- Number(u64),
|
|
+ Number(usize),
|
|
String(String),
|
|
}
|
|
|