From 1858e06b092def68383d979f7812785b6f5b42aa Mon Sep 17 00:00:00 2001 From: Sean Young Date: Sat, 11 May 2024 12:59:55 +0100 Subject: [PATCH] Use aya from git Signed-off-by: Sean Young --- Cargo.toml | 2 +- irp/Cargo.toml | 2 +- src/lirc.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d9afa88..f52361b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ log = "0.4" peg = "0.8" [target.'cfg(target_os = "linux")'.dependencies] -aya = "0.12" +aya = { git = "https://github.com/aya-rs/aya.git" } irp = { version = "0.3.3", path = "irp", features = [ "bpf" ] } [target.'cfg(not(target_os = "linux"))'.dependencies] diff --git a/irp/Cargo.toml b/irp/Cargo.toml index c09d6b2..b053e0c 100644 --- a/irp/Cargo.toml +++ b/irp/Cargo.toml @@ -30,5 +30,5 @@ bpf = [ "inkwell" ] cir = { path = ".." } rand = "0.8" irptransmogrifier = { path = "tests/rust-irptransmogrifier" } -aya-obj = "0.1" +aya-obj = { version = "0.1", features = [ "std" ] } rbpf = "0.2" diff --git a/src/lirc.rs b/src/lirc.rs index c6d07a8..9fa255a 100644 --- a/src/lirc.rs +++ b/src/lirc.rs @@ -2,7 +2,7 @@ use aya::{ programs::{Link, LircMode2, ProgramError}, - Bpf, + Ebpf, }; use num_integer::Integer; use std::{ @@ -466,7 +466,7 @@ impl Lirc { /// Load and attach bpf program. The bpf program should a valid ELF object file, /// which contains a single LircMode2 program. pub fn attach_bpf(&self, bpf: &[u8]) -> Result<(), String> { - let mut bpf = match Bpf::load(bpf) { + let mut bpf = match Ebpf::load(bpf) { Ok(bpf) => bpf, Err(e) => { return Err(format!("{e}"));