From 4c068c3be1e8501ba85d4b98f6b869474fc967df Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 13 Oct 2023 18:01:50 -0700 Subject: [PATCH] glibc patch: inline x86-lp_size.h I could have just included the file from upstream glibc, but it was too silly so I just inlined it. This patch could be dropped in a future glibc update if desired. If omitted it will cause easily solvable C compilation failures building glibc nonshared. --- lib/libc/glibc/sysdeps/x86_64/sysdep.h | 6 +++++- lib/libc/glibc/sysdeps/x86_64/x32/sysdep.h | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/libc/glibc/sysdeps/x86_64/sysdep.h b/lib/libc/glibc/sysdeps/x86_64/sysdep.h index db6e36b2dd..ad90e8c8cc 100644 --- a/lib/libc/glibc/sysdeps/x86_64/sysdep.h +++ b/lib/libc/glibc/sysdeps/x86_64/sysdep.h @@ -20,7 +20,11 @@ #define _X86_64_SYSDEP_H 1 #include -#include +#ifdef __ASSEMBLER__ +# define LP_SIZE 8 +#else +# define LP_SIZE "8" +#endif /* __CET__ is defined by GCC with Control-Flow Protection values: diff --git a/lib/libc/glibc/sysdeps/x86_64/x32/sysdep.h b/lib/libc/glibc/sysdeps/x86_64/x32/sysdep.h index 4647ea4056..02036edd7d 100644 --- a/lib/libc/glibc/sysdeps/x86_64/x32/sysdep.h +++ b/lib/libc/glibc/sysdeps/x86_64/x32/sysdep.h @@ -17,7 +17,11 @@ . */ #include -#include +#ifdef __ASSEMBLER__ +# define LP_SIZE 4 +#else +# define LP_SIZE "4" +#endif #undef LP_OP #undef ASM_ADDR