Changeset View
Changeset View
Standalone View
Standalone View
graphics/mesa-dri/files/patch-src_util_build__id.c
| # Elf_ doesn't exist, use Elf32_ or Elf64_ | # Elf_ doesn't exist, use Elf32_ or Elf64_ | ||||
| # | # | ||||
| --- src/util/build_id.c.orig 2017-12-21 17:31:22 UTC | --- src/util/build_id.c.orig 2017-12-21 17:31:22 UTC | ||||
| +++ src/util/build_id.c | +++ src/util/build_id.c | ||||
| @@ -34,7 +34,11 @@ | @@ -38,6 +38,10 @@ | ||||
| #define ElfW(type) Elf_##type | |||||
| #endif | #endif | ||||
| #ifndef ElfW | +#if defined(__FreeBSD__) && __FreeBSD__ < 12 | ||||
| -#define ElfW(type) Elf_##type | +typedef Elf_Note Elf_Nhdr; | ||||
| +#ifdef __LP64__ | |||||
| +#define ElfW(type) Elf64_##type | |||||
| +#else | |||||
| +#define ElfW(type) Elf32_##type | |||||
| +#endif | +#endif | ||||
| #endif | + | ||||
| struct build_id_note { | |||||
| ElfW(Nhdr) nhdr; | |||||
| #define ALIGN(val, align) (((val) + (align) - 1) & ~((align) - 1)) | |||||