summaryrefslogtreecommitdiff
path: root/net/aoe-vblade/patches
diff options
context:
space:
mode:
authorobache <obache>2011-01-01 12:42:28 +0000
committerobache <obache>2011-01-01 12:42:28 +0000
commit914d9af332be16ebc667e251c3872ba6cbaf76d8 (patch)
treeeb5a5c888887f149dd04b5a09733577995809a8d /net/aoe-vblade/patches
parent7b9af18433c9b3ef038a7c59e0727eb9df33863c (diff)
downloadpkgsrc-914d9af332be16ebc667e251c3872ba6cbaf76d8.tar.gz
Fixes for DragonFly-2.8.2.
Diffstat (limited to 'net/aoe-vblade/patches')
-rw-r--r--net/aoe-vblade/patches/patch-aa27
1 files changed, 25 insertions, 2 deletions
diff --git a/net/aoe-vblade/patches/patch-aa b/net/aoe-vblade/patches/patch-aa
index 60c44162eb0..d14a1d69b5c 100644
--- a/net/aoe-vblade/patches/patch-aa
+++ b/net/aoe-vblade/patches/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.2 2007/03/31 13:36:27 obache Exp $
+$NetBSD: patch-aa,v 1.3 2011/01/01 12:42:28 obache Exp $
--- freebsd.c.orig 2006-11-13 18:57:34.000000000 +0000
+++ freebsd.c
@@ -15,9 +15,13 @@ $NetBSD: patch-aa,v 1.2 2007/03/31 13:36:27 obache Exp $
#include <net/bpf.h>
#include <net/if.h>
#include <net/if_arp.h>
-@@ -27,6 +32,9 @@
+@@ -26,7 +31,13 @@
+ #include <net/if.h>
#include <sys/stat.h>
#include <sys/disklabel.h>
++#ifdef __DragonFly__
++#include <sys/disklabel32.h>
++#endif
#include <sys/select.h>
+#ifdef __NetBSD__
+#include <sys/param.h>
@@ -25,3 +29,22 @@ $NetBSD: patch-aa,v 1.2 2007/03/31 13:36:27 obache Exp $
#include <sys/sysctl.h>
#include <fcntl.h>
+@@ -302,10 +313,18 @@ getsize(int fd)
+ vlong size;
+ struct stat s;
+ int n;
++#ifdef __DragonFly__
++ struct disklabel32 lab;
++#else
+ struct disklabel lab;
++#endif
+
+ // Try getting disklabel from block dev
++#ifdef __DragonFly__
++ if ((n = ioctl(fd, DIOCGDINFO32, lab)) != -1) {
++#else
+ if ((n = ioctl(fd, DIOCGDINFO, lab)) != -1) {
++#endif
+ size = lab.d_secsize * lab.d_secperunit;
+ } else {
+ // must not be a block special dev