34c34
< __FBSDID("$FreeBSD: head/sys/compat/ndis/subr_pe.c 142387 2005-02-24 17:58:27Z wpaul $");
---
> __FBSDID("$FreeBSD: head/sys/compat/ndis/subr_pe.c 151703 2005-10-26 18:46:27Z wpaul $");
59a60
> #include <stddef.h>
145c146
< sizeof(image_optional_header));
---
> nt_hdr->inh_filehdr.ifh_optionalhdrlen);
171a173,180
> /*
> * Note: the size of the nt_header is variable since it
> * can contain optional fields, as indicated by ifh_optionalhdrlen.
> * However it happens we're only interested in fields in the
> * non-variant portion of the nt_header structure, so we don't
> * bother copying the optional parts here.
> */
>
200,201c209
< sect_hdr = (image_section_header *)((vm_offset_t)nt_hdr +
< sizeof(image_nt_header));
---
> sect_hdr = IMAGE_FIRST_SECTION(nt_hdr);
283,284c291
< sect_hdr = (image_section_header *)((vm_offset_t)nt_hdr +
< sizeof(image_nt_header));
---
> sect_hdr = IMAGE_FIRST_SECTION(nt_hdr);
342,343c349
< sect_hdr = (image_section_header *)((vm_offset_t)nt_hdr +
< sizeof(image_nt_header));
---
> sect_hdr = IMAGE_FIRST_SECTION(nt_hdr);
< __FBSDID("$FreeBSD: head/sys/compat/ndis/subr_pe.c 142387 2005-02-24 17:58:27Z wpaul $");
---
> __FBSDID("$FreeBSD: head/sys/compat/ndis/subr_pe.c 151703 2005-10-26 18:46:27Z wpaul $");
59a60
> #include <stddef.h>
145c146
< sizeof(image_optional_header));
---
> nt_hdr->inh_filehdr.ifh_optionalhdrlen);
171a173,180
> /*
> * Note: the size of the nt_header is variable since it
> * can contain optional fields, as indicated by ifh_optionalhdrlen.
> * However it happens we're only interested in fields in the
> * non-variant portion of the nt_header structure, so we don't
> * bother copying the optional parts here.
> */
>
200,201c209
< sect_hdr = (image_section_header *)((vm_offset_t)nt_hdr +
< sizeof(image_nt_header));
---
> sect_hdr = IMAGE_FIRST_SECTION(nt_hdr);
283,284c291
< sect_hdr = (image_section_header *)((vm_offset_t)nt_hdr +
< sizeof(image_nt_header));
---
> sect_hdr = IMAGE_FIRST_SECTION(nt_hdr);
342,343c349
< sect_hdr = (image_section_header *)((vm_offset_t)nt_hdr +
< sizeof(image_nt_header));
---
> sect_hdr = IMAGE_FIRST_SECTION(nt_hdr);