hello_world: Fix stat with coreutils(linux)

the development nix shell has coreutils
This commit is contained in:
Artturin 2025-02-22 21:44:28 +02:00
parent 3c14139753
commit c82dfbe2a7

View file

@ -28,7 +28,7 @@ $(ELF): $(SRC) $(LDSCRIPT)
$(BIN): $(ELF)
$(OBJCOPY) -O binary $(ELF) $(BIN)
# Pad the binary to a multiple of 4 bytes
size=$$(stat -f%z $(BIN)); \
size=$$(stat -c %s $(BIN)); \
padding=$$(( (4 - (size % 4)) % 4 )); \
[ $$padding -ne 0 ] && dd if=/dev/zero bs=1 count=$$padding >> $(BIN) || true