build_id.c:36:20: error: unknown type name 'Elf_Nhdr'
Submitted by Vinson Lee
Assigned to mes..@..op.org
Description
mesa: 292c24dd (master 17.1.0-devel)
FreeBSD build error.
CC libmesautil_la-build_id.lo build_id.c:36:20: error: unknown type name 'Elf_Nhdr' #define ElfW(type) Elf_##type ^ build_id.c:42:4: note: in expansion of macro 'ElfW' ElfW(Nhdr) nhdr; ^ build_id.c: In function 'build_id_find_nhdr_callback': build_id.c:71:24: error: request for member 'n_type' in something not a structure or union if (note->nhdr.n_type == NT_GNU_BUILD_ID && ^ build_id.c:72:23: error: request for member 'n_descsz' in something not a structure or union note->nhdr.n_descsz != 0 && ^ build_id.c:73:23: error: request for member 'n_namesz' in something not a structure or union note->nhdr.n_namesz == 4 && ^ build_id.c:36:20: error: 'Elf_Nhdr' undeclared (first use in this function) #define ElfW(type) Elf_##type ^ build_id.c:79:33: note: in expansion of macro 'ElfW' size_t offset = sizeof(ElfW(Nhdr)) + ^ build_id.c:36:20: note: each undeclared identifier is reported only once for each function it appears in #define ElfW(type) Elf_##type ^ build_id.c:79:33: note: in expansion of macro 'ElfW' size_t offset = sizeof(ElfW(Nhdr)) + ^ build_id.c:80:42: error: request for member 'n_namesz' in something not a structure or union ALIGN(note->nhdr.n_namesz, 4) + ^ build_id.c:39:35: note: in definition of macro 'ALIGN' #define ALIGN(val, align) (((val) + (align) - 1) & ~((align) - 1)) ^ build_id.c:81:42: error: request for member 'n_descsz' in something not a structure or union ALIGN(note->nhdr.n_descsz, 4); ^ build_id.c:39:35: note: in definition of macro 'ALIGN' #define ALIGN(val, align) (((val) + (align) - 1) & ~((align) - 1)) ^ build_id.c: In function 'build_id_length': build_id.c:107:21: error: request for member 'n_descsz' in something not a structure or union return note->nhdr.n_descsz; ^ build_id.c:108:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
Version: 17.1