diff options
author | Jan Janssen <medhefgo@web.de> | 2023-01-07 09:19:23 +0100 |
---|---|---|
committer | Jan Janssen <medhefgo@web.de> | 2023-02-21 21:07:04 +0100 |
commit | 3ceaa05d566f178ccfdc6ba180e0e63f96216d87 (patch) | |
tree | 5ae714366f96f841057f691a6923fec569be3d41 /src/fundamental | |
parent | a4ab05e296a605cff9d3d42d9c80dac910530a96 (diff) | |
download | systemd-3ceaa05d566f178ccfdc6ba180e0e63f96216d87.tar.gz |
boot: Do not use errno.h/inttypes.h
These are provided by libc instead of the compiler and are not supposed
to be used in freestanding environments.
When cross-compiling with clang and the corresponding gcc
cross-toolchain is not around, clang may pick up the wrong header from
the host system.
Diffstat (limited to 'src/fundamental')
-rw-r--r-- | src/fundamental/efivars-fundamental.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/fundamental/efivars-fundamental.h b/src/fundamental/efivars-fundamental.h index cf785f8b7d..3bad79b036 100644 --- a/src/fundamental/efivars-fundamental.h +++ b/src/fundamental/efivars-fundamental.h @@ -1,7 +1,11 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -#include <errno.h> +#ifdef SD_BOOT +# define EINVAL 22 +#else +# include <errno.h> +#endif #include "string-util-fundamental.h" /* Features of the loader, i.e. systemd-boot */ |