--- mopd-2.5.3.orig/patches/mopd-2.5.3-freebsd-put.patch
+++ mopd-2.5.3/patches/mopd-2.5.3-freebsd-put.patch
@@ -0,0 +1,51 @@
+diff -up --recursive --new-file mopd-2.5.3.macro/common/put.c mopd-2.5.3/common/put.c
+--- mopd-2.5.3.macro/common/put.c 2002-11-17 13:05:38.000000000 +0000
++++ mopd-2.5.3/common/put.c 2002-11-17 15:37:16.000000000 +0000
+@@ -34,6 +34,9 @@ static char rcsid[] = "$Id: put.c,v 1.5
+ #include <stddef.h>
+ #include <sys/types.h>
+ #include <time.h>
++#ifdef __FreeBSD__
++#include <osreldate.h>
++#endif
+ #include "mopdef.h"
+
+ void
+@@ -147,10 +150,7 @@ mopPutHeader(pkt, index, dst, src, proto
+ mopPutChar (pkt, index, 0x00);
+ mopPutChar (pkt, index, 0x2b);
+ }
+-#if !defined(__FreeBSD__)
+- mopPutChar(pkt, index, (proto / 256));
+- mopPutChar(pkt, index, (proto % 256));
+-#else
++#if defined(__FreeBSD__) && __FreeBSD_version < 220000
+ if (trans == TRANS_ETHER) {
+ mopPutChar(pkt, index, (proto % 256));
+ mopPutChar(pkt, index, (proto / 256));
+@@ -158,6 +158,9 @@ mopPutHeader(pkt, index, dst, src, proto
+ mopPutChar(pkt, index, (proto / 256));
+ mopPutChar(pkt, index, (proto % 256));
+ }
++#else
++ mopPutChar(pkt, index, (proto / 256));
++ mopPutChar(pkt, index, (proto % 256));
+ #endif
+ if (trans != TRANS_8023)
+ mopPutShort(pkt, index, 0);
+@@ -180,12 +183,12 @@ mopPutLength(pkt, trans, len)
+ break;
+ case TRANS_8023:
+ index = 12;
+-#if !defined(__FreeBSD__)
+- mopPutChar(pkt, &index, ((len - 14) / 256));
++#if defined(__FreeBSD__) && __FreeBSD_version < 220000
+ mopPutChar(pkt, &index, ((len - 14) % 256));
++ mopPutChar(pkt, &index, ((len - 14) / 256));
+ #else
+- mopPutChar(pkt, &index, ((len - 14) % 256));
+ mopPutChar(pkt, &index, ((len - 14) / 256));
++ mopPutChar(pkt, &index, ((len - 14) % 256));
+ #endif
+ break;
+ case TRANS_FDDI_8021H: