1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

Need to make the use Linux-only too.

This commit is contained in:
Steve Smith 2016-06-05 11:45:44 +01:00
parent 1606770a3e
commit 7a3ba3242a

View file

@ -26,8 +26,6 @@ use std::ffi::{OsString,CStr};
use std::path::Path;
use std::io::Write;
use std::ptr;
use uucore::c_types::{getpwuid, getgrgid};
#[derive(Copy, Clone, PartialEq)]
enum Mode {
@ -166,6 +164,9 @@ fn cstr2string(cstr: *const c_char) -> String {
// Currently getpwuid is `linux` target only. If it's broken out into
// a posix-compliant attribute this can be updated...
#[cfg(target_family = "linux")]
use uucore::c_types::{getpwuid, getgrgid};
#[cfg(target_family = "linux")]
fn display_uname(metadata: &Metadata) -> String {
use std::os::unix::fs::MetadataExt;