From 6ac2a1c4830f965b834c09e945fc289aa4e40ab3 Mon Sep 17 00:00:00 2001 From: Hristo Mitrev Date: Mon, 17 Oct 2022 15:26:37 +0300 Subject: Fix build on i386 architecture Signed-off-by: Hristo Mitrev --- Cargo.toml | 1 + src/remapper.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 27e27a5..fd7bc25 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,3 +13,4 @@ structopt = "0.3" serde = { version="1.0", features=["derive"]} thiserror = "1.0" toml = "0.5" +libc = "0.2" diff --git a/src/remapper.rs b/src/remapper.rs index b33c0e2..0e90697 100644 --- a/src/remapper.rs +++ b/src/remapper.rs @@ -35,7 +35,7 @@ impl KeyEventType { } fn timeval_diff(newer: &TimeVal, older: &TimeVal) -> Duration { - const MICROS_PER_SECOND: i64 = 1000000; + const MICROS_PER_SECOND: libc::time_t = 1000000; let secs = newer.tv_sec - older.tv_sec; let usecs = newer.tv_usec - older.tv_usec; -- cgit v1.2.3