1 $NetBSD: patch-aa,v 1.2 2007/03/31 13:36:27 obache Exp $
3 --- freebsd.c.orig 2006-11-13 18:57:34.000000000 +0000
8 #include <netinet/in.h>
11 +#include <net/if_ether.h>
13 #include <net/ethernet.h>
17 #include <net/if_arp.h>
21 #include <sys/disklabel.h>
23 +#include <sys/disklabel32.h>
25 #include <sys/select.h>
27 +#include <sys/param.h>
29 #include <sys/sysctl.h>
32 @@ -302,10 +313,18 @@ getsize(int fd)
37 + struct disklabel32 lab;
42 // Try getting disklabel from block dev
44 + if ((n = ioctl(fd, DIOCGDINFO32, lab)) != -1) {
46 if ((n = ioctl(fd, DIOCGDINFO, lab)) != -1) {
48 size = lab.d_secsize * lab.d_secperunit;
50 // must not be a block special dev