Subject: | Build failure on 10.x+ |
src r253361 (pre-stable/10 branching) removed struct mbstat from mbuf.h, so build fails.
Attached patch [ab]uses __FreeBSD_version bump from actually a few days prior to that change to make it build by bypassing that whole block. If the struct is gone, it _probably_ never gets hit anyway, but I haven't investigated to be sure. At least it builds and works in my very light use with that change.
Subject: | bsd-sysctl.patch |
--- Sysctl.xs.orig 2013-12-26 15:39:24.130607201 -0600
+++ Sysctl.xs 2013-12-26 15:41:09.233611186 -0600
@@ -537,6 +537,7 @@
/* the remaining custom formats are for opaque mibs */
case FMT_MBSTAT: {
HV *c = (HV *)sv_2mortal((SV *)newHV());
+#if __FreeBSD_version < 1000037
struct mbstat *inf = (struct mbstat *)buf;
RETVAL = newRV((SV *)c);
hv_store(c, "copymfail", 9, newSVuv(inf->m_mcfail), 0);
@@ -563,6 +564,7 @@
hv_store(c, "sfallocwait", 11, newSVuv(inf->sf_allocwait), 0);
hv_store(c, "sfiocnt", 7, newSVuv(inf->sf_iocnt), 0);
#endif
+#endif
break;
}
case FMT_NTPTIMEVAL: {