summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorBill Paul <wpaul@FreeBSD.org>2005-10-26 18:48:57 +0000
committerBill Paul <wpaul@FreeBSD.org>2005-10-26 18:48:57 +0000
commit0a005eab36c1bef79d7070cee7d128fe992a4f8c (patch)
tree6da4b1d714f1f720d257fa6b027dbd55db7f9876 /usr.sbin
parentb0dafce0d9a27423533e1fa8ec8338f3e2432180 (diff)
Notes
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ndiscvt/ndiscvt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ndiscvt/ndiscvt.c b/usr.sbin/ndiscvt/ndiscvt.c
index 090f0834f660..80eae836f080 100644
--- a/usr.sbin/ndiscvt/ndiscvt.c
+++ b/usr.sbin/ndiscvt/ndiscvt.c
@@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
#include <sys/socket.h>
#include <net/if.h>
#include <stdlib.h>
+#include <stddef.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
@@ -88,8 +89,7 @@ extern const char *__progname;
#define SET_HDRS(x) \
dos_hdr = (image_dos_header *)x; \
nt_hdr = (image_nt_header *)(x + dos_hdr->idh_lfanew); \
- sect_hdr = (image_section_header *)((vm_offset_t)nt_hdr + \
- sizeof(image_nt_header));
+ sect_hdr = IMAGE_FIRST_SECTION(nt_hdr);
static
int insert_padding(imgbase, imglen)