From 6f6e735ba728b7023df2b233700f1212a67fa5e0 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Thu, 18 Jan 2024 14:13:22 +0100 Subject: [PATCH] Fix cross build of systemd 254.6 --- overlay.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/overlay.nix b/overlay.nix index 972c842..2f973f3 100644 --- a/overlay.nix +++ b/overlay.nix @@ -10,4 +10,12 @@ final: prev: # Check with: riscv64-unknown-elf-objdump -d -M no-aliases rotate ]; }); + + # Fix GCC 13 format-overflow warning/error: + # ../src/shared/install.c:444:64: error: ā€˜%sā€™ directive argument is null [-Werror=format-overflow=] + # 444 | err = log_error_errno(changes[i].type, "Failed to %s unit, unit %s does not exist.", + # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + systemd = prev.systemd.overrideAttrs (old: { + CFLAGS = "-Wno-error=format-overflow"; + }); }