Applied, thanks!
Sergey Bugaev, le mer. 27 mars 2024 19:18:28 +0300, a ecrit:
> Not only on x86_64.
> ---
> include/mach/exec/elf.h | 4 ++--
> kern/exception.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/mach/exec/elf.h b/include/mach/exec/elf.h
> index 42920e25..55304496 100644
> --- a/include/mach/exec/elf.h
> +++ b/include/mach/exec/elf.h
> @@ -212,7 +212,7 @@ typedef struct elf64_sym {
> Elf64_Xword st_size;
> } Elf64_Sym;
>
> -#ifdef __x86_64__
> +#ifdef __LP64__
> #define Elf_Sym Elf64_Sym
> #define Elf_Shdr Elf64_Shdr
> #else
> @@ -350,7 +350,7 @@ typedef struct {
> #define DT_TEXTREL 22
> #define DT_JMPREL 23
>
> -#if defined(__x86_64__) && ! defined(USER32)
> +#if defined(__LP64__) && ! defined(USER32)
> typedef Elf64_Ehdr Elf_Ehdr;
> typedef Elf64_Phdr Elf_Phdr;
> #else
> diff --git a/kern/exception.c b/kern/exception.c
> index 15f29705..7139b466 100644
> --- a/kern/exception.c
> +++ b/kern/exception.c
> @@ -283,7 +283,7 @@ struct mach_exception {
> #define INTEGER_T_SIZE_IN_BITS (8 * sizeof(integer_t))
> #define INTEGER_T_TYPE MACH_MSG_TYPE_INTEGER_T
> #define RPC_LONG_INTEGER_T_SIZE_IN_BITS (8 * sizeof(rpc_long_integer_t))
> -#if defined(__x86_64__) && !defined(USER32)
> +#if defined(__LP64__) && !defined(USER32)
> #define RPC_LONG_INTEGER_T_TYPE MACH_MSG_TYPE_INTEGER_64
> #else
> #define RPC_LONG_INTEGER_T_TYPE MACH_MSG_TYPE_INTEGER_32
> --
> 2.44.0
>
>
--
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.