From 37a99b6d81551bced73cf7d32c21bf72cb060bd9 Mon Sep 17 00:00:00 2001 From: Ramakrishnan Muthukrishnan <ram@rkrishnan.org> Date: Wed, 8 Mar 2023 19:10:41 +0530 Subject: [PATCH] rust: misc --- hpsdrsim.c | 2 +- rust/Cargo.toml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hpsdrsim.c b/hpsdrsim.c index cbcc943..5ff85bb 100644 --- a/hpsdrsim.c +++ b/hpsdrsim.c @@ -518,7 +518,7 @@ int main(int argc, char *argv[]) udp_retries=0; } if (bytes_read <= 0) continue; - memcpy(&code, buffer, 4); + memcpy(&code, buffer, 4); switch (code) { diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 0060b33..453e46a 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -7,10 +7,14 @@ authors = ["Ramakrishnan Muthukrishnan <ram@rkrishnan.org>"] [dependencies] libc = "0.2" cbindgen = "0.24.3" +binary-layout = "3.1.3" [lib] name = "hpsdr" crate-type = ["staticlib"] +[[bin]] +name = "hpsdrsim-rs" +path = "cmd/hpsdrsim.rs" [build-dependencies] cbindgen = "0.20.0" -- 2.45.2