mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-30 04:27:45 +00:00
commit
774695d697
2 changed files with 10 additions and 2 deletions
8
Makefile
8
Makefile
|
@ -130,9 +130,13 @@ endef
|
||||||
ALIAS_SOURCE = $(firstword $(subst :, ,$(1)))
|
ALIAS_SOURCE = $(firstword $(subst :, ,$(1)))
|
||||||
ALIAS_TARGET = $(word 2,$(subst :, ,$(1)))
|
ALIAS_TARGET = $(word 2,$(subst :, ,$(1)))
|
||||||
define MAKE_ALIAS
|
define MAKE_ALIAS
|
||||||
|
|
||||||
|
ifneq ($(ALIAS_TARGET,$(1)),)
|
||||||
all: build/$(call ALIAS_TARGET,$(1))
|
all: build/$(call ALIAS_TARGET,$(1))
|
||||||
build/$(call ALIAS_TARGET,$(1)): build/$(call ALIAS_SOURCE,$(1))
|
build/$(call ALIAS_TARGET,$(1)): build/$(call ALIAS_SOURCE,$(1))
|
||||||
$(call command,install build/$(call ALIAS_SOURCE,$(1)) build/$(call ALIAS_TARGET,$(1)))
|
$(call command,install build/$(call ALIAS_SOURCE,$(1)) build/$(call ALIAS_TARGET,$(1)))
|
||||||
|
endif
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Test exe built rules
|
# Test exe built rules
|
||||||
|
@ -145,11 +149,15 @@ tmp/$(1)_test: $(1)/test.rs
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Main rules
|
# Main rules
|
||||||
|
ifeq ($(BUILD), $(PROGS))
|
||||||
all: $(EXES_PATHS) build/uutils
|
all: $(EXES_PATHS) build/uutils
|
||||||
|
|
||||||
-include build/uutils.d
|
-include build/uutils.d
|
||||||
build/uutils: uutils/uutils.rs $(addprefix build/, $(addsuffix .timestamp, $(CRATES)))
|
build/uutils: uutils/uutils.rs $(addprefix build/, $(addsuffix .timestamp, $(CRATES)))
|
||||||
$(RUSTC) $(RUSTCFLAGS) -L build/ --dep-info $@.d uutils/uutils.rs -o $@
|
$(RUSTC) $(RUSTCFLAGS) -L build/ --dep-info $@.d uutils/uutils.rs -o $@
|
||||||
|
else
|
||||||
|
all: $(EXES_PATHS)
|
||||||
|
endif
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
LIBCRYPTO = $(shell $(RUSTC) --crate-file-name --crate-type rlib deps/rust-crypto/src/rust-crypto/lib.rs)
|
LIBCRYPTO = $(shell $(RUSTC) --crate-file-name --crate-type rlib deps/rust-crypto/src/rust-crypto/lib.rs)
|
||||||
|
|
4
id/id.rs
4
id/id.rs
|
@ -307,8 +307,8 @@ fn auditid() { }
|
||||||
|
|
||||||
#[cfg(not(target_os = "linux"))]
|
#[cfg(not(target_os = "linux"))]
|
||||||
fn auditid() {
|
fn auditid() {
|
||||||
let auditinfo: audit::c_auditinfo_addr_t = unsafe { audit::uninitialized() };
|
let mut auditinfo: audit::c_auditinfo_addr_t = unsafe { audit::uninitialized() };
|
||||||
let address = &auditinfo as *mut audit::c_auditinfo_addr_t;
|
let address = &mut auditinfo as *mut audit::c_auditinfo_addr_t;
|
||||||
if unsafe { audit::getaudit(address) } < 0 {
|
if unsafe { audit::getaudit(address) } < 0 {
|
||||||
println!("couldn't retrieve information");
|
println!("couldn't retrieve information");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue