mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Need to make the use
Linux-only too.
This commit is contained in:
parent
1606770a3e
commit
7a3ba3242a
1 changed files with 3 additions and 2 deletions
|
@ -26,8 +26,6 @@ use std::ffi::{OsString,CStr};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use uucore::c_types::{getpwuid, getgrgid};
|
|
||||||
|
|
||||||
|
|
||||||
#[derive(Copy, Clone, PartialEq)]
|
#[derive(Copy, Clone, PartialEq)]
|
||||||
enum Mode {
|
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
|
// Currently getpwuid is `linux` target only. If it's broken out into
|
||||||
// a posix-compliant attribute this can be updated...
|
// a posix-compliant attribute this can be updated...
|
||||||
|
#[cfg(target_family = "linux")]
|
||||||
|
use uucore::c_types::{getpwuid, getgrgid};
|
||||||
|
|
||||||
#[cfg(target_family = "linux")]
|
#[cfg(target_family = "linux")]
|
||||||
fn display_uname(metadata: &Metadata) -> String {
|
fn display_uname(metadata: &Metadata) -> String {
|
||||||
use std::os::unix::fs::MetadataExt;
|
use std::os::unix::fs::MetadataExt;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue