mirror of
https://github.com/cloudflare/pingora.git
synced 2024-09-20 02:31:35 +02:00
Fix build on FreeBSD.
Define `group_id` in the pingora-core's server daemon on FreeBSD.
This commit is contained in:
parent
36e09ca389
commit
df9f2da7bd
1 changed files with 2 additions and 2 deletions
|
@ -81,8 +81,8 @@ pub fn daemonize(conf: &ServerConf) {
|
|||
Some(user) => {
|
||||
let user_cstr = CString::new(user.as_str()).unwrap();
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
let group_id = unsafe { gid_for_username(&user_cstr).map(|gid| gid as i32) };
|
||||
#[cfg(any(target_os = "freebsd", target_os = "macos"))]
|
||||
let group_id = unsafe { gid_for_username(&user_cstr).map(|gid| gid as u32) };
|
||||
#[cfg(target_os = "linux")]
|
||||
let group_id = unsafe { gid_for_username(&user_cstr) };
|
||||
|
||||
|
|
Loading…
Reference in a new issue