From 7014ca143c55b829d625a3afae8b3adc4340dfaa Mon Sep 17 00:00:00 2001 From: Steve Lau Date: Sun, 17 Nov 2024 16:59:13 +0800 Subject: [PATCH] fix: Linux build by importing CStr --- test/test_syslog.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_syslog.rs b/test/test_syslog.rs index 4491f211ed..fc8f908070 100644 --- a/test/test_syslog.rs +++ b/test/test_syslog.rs @@ -17,6 +17,8 @@ fn test_syslog_hello_world() { #[test] #[cfg(target_os = "linux")] fn test_openlog_with_ident() { + use std::ffi::CStr; + const IDENT: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"test_openlog_with_ident\0") };