Index: usr.sbin/crunch/crunchide/exec_elf32.c =================================================================== --- usr.sbin/crunch/crunchide/exec_elf32.c +++ usr.sbin/crunch/crunchide/exec_elf32.c @@ -46,6 +46,7 @@ #include #include +#include #include #include #include @@ -464,7 +465,7 @@ if (layoutp[i].shdr == &shdrshdr && ehdr.e_shoff != shdrshdr.sh_offset) { ehdr.e_shoff = shdrshdr.sh_offset; - off = (ELFSIZE == 32) ? 32 : 44; + off = offsetof(Elf_Ehdr, e_shoff); size = sizeof(Elf_Off); if ((size_t)xwriteatoff(fd, &ehdr.e_shoff, off, size, fn) != size)