From 9a3a8d5b9f3f671d2e40bc6a6734ff315523a59e Mon Sep 17 00:00:00 2001 From: Shell Chen Date: Thu, 9 Jun 2022 17:44:26 +0800 Subject: [PATCH] Fix build for 32-bit Linux --- src/linux/systemd.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/linux/systemd.rs b/src/linux/systemd.rs index dbd16d9..61485b4 100644 --- a/src/linux/systemd.rs +++ b/src/linux/systemd.rs @@ -1,3 +1,4 @@ +use libc::{dev_t as Dev, ino_t as Inode}; use nix::sys::stat::fstat; use sd_notify::{notify, NotifyState}; use std::{borrow::Cow, env, io, os::unix::prelude::AsRawFd, process, time::Duration}; @@ -57,7 +58,7 @@ pub async fn watchdog_loop(timeout: Duration) -> ! { } /// Try to read the device & inode number from environment variable `JOURNAL_STREAM`. -fn get_journal_stream_dev_ino() -> Option<(u64, u64)> { +fn get_journal_stream_dev_ino() -> Option<(Dev, Inode)> { let stream_env = env::var_os("JOURNAL_STREAM")?; let (dev, ino) = stream_env.to_str()?.split_once(':')?; Some((dev.parse().ok()?, ino.parse().ok()?))