]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-boot: efi-log: fix `__stack_chk_guard` type
authorSergei Trofimovich <slyich@gmail.com>
Tue, 5 May 2026 20:55:30 +0000 (21:55 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 6 May 2026 07:18:25 +0000 (09:18 +0200)
commitfc68ee611886c4f2d7d5bccdcfd700c5f28ed2d1
tree27476d4785de61893721500924ef4d77fc8f589d
parent72fedd6037999335bc622fb690be89d570e7aac8
sd-boot: efi-log: fix `__stack_chk_guard` type

In https://gcc.gnu.org/PR121911 `gcc` started enforcing the type of
`__stack_chk_guard` to `uintptr_t` and broke `systemd` build as:

```
../src/boot/efi-log.c:136:17: error: conflicting types for '__stack_chk_guard'; have 'intptr_t' {aka 'long int'}
  136 | _used_ intptr_t __stack_chk_guard = (intptr_t) 0x70f6967de78acae3;
      |                 ^~~~~~~~~~~~~~~~~
cc1: note: previous declaration of '__stack_chk_guard' with type 'long unsigned int'
../src/boot/efi-log.c:136:17: error: declaration of '__stack_chk_guard' shadows a global declaration [-Werror=shadow]
  136 | _used_ intptr_t __stack_chk_guard = (intptr_t) 0x70f6967de78acae3;
      |                 ^~~~~~~~~~~~~~~~~
```

Let's match the declaration to unsigned type as suggested by upstream in
https://gcc.gnu.org/PR121911#c6.
src/boot/efi-log.c