pkgsrc-wip/p5-Quota/patches/patch-aa
2007-07-22 08:35:51 +00:00

35 lines
1.1 KiB
Text

$NetBSD: patch-aa,v 1.2 2007/07/22 08:35:51 shattered Exp $
--- Quota.xs.orig 2005-07-10 15:18:58.000000000 -0300
+++ Quota.xs
@@ -29,7 +29,11 @@ extern "C" {
#ifndef NO_MNTENT
FILE *mtab = NULL;
#else
+#if (defined(__NetBSD__) && __NetBSD_Version__ >= 299000900)
+struct statvfs *mntp, *mtab = NULL;
+#else
struct statfs *mntp, *mtab = NULL;
+#endif
int mtab_size = 0;
#endif
#else /* AIX */
@@ -788,13 +792,17 @@ getmntent()
PUSHs(sv_2mortal(newSVpv(fstype, strlen(fstype))));
else
#endif
-#ifndef __OpenBSD__
+#if (!defined(__OpenBSD__) && (!defined(__NetBSD__) || __NetBSD_Version__ < 299000900))
PUSHs(sv_2mortal(newSViv((IV)mntp->f_type)));
#else
/* OpenBSD struct statfs lacks the f_type member (starting with release 2.7) */
PUSHs(sv_2mortal(newSViv((IV)"")));
#endif
+#if (defined(__NetBSD__) && __NetBSD_Version__ >= 299000900)
+ PUSHs(sv_2mortal(newSViv((IV)mntp->f_flag)));
+#else
PUSHs(sv_2mortal(newSViv((IV)mntp->f_flags)));
+#endif
mtab_size--;
mntp++;
}