diff options
author | Stefan Eßer <se@FreeBSD.org> | 2020-09-29 21:50:34 +0000 |
---|---|---|
committer | Stefan Eßer <se@FreeBSD.org> | 2020-09-29 21:50:34 +0000 |
commit | 3a82c56aca7f24585025d4c94b1b8f863f636f3a (patch) | |
tree | e18ada8fbceacf39630824ce6d261cbad7f65ce5 /net/mopd/files/patch-common_put.c | |
parent | www/py-boto3: Update 1.14.1 -> 1.15.8 (diff) |
Fix build with -fno-common
While here regenerate all patch files with make-patch
Notes
Notes:
svn path=/head/; revision=550628
Diffstat (limited to 'net/mopd/files/patch-common_put.c')
-rw-r--r-- | net/mopd/files/patch-common_put.c | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/net/mopd/files/patch-common_put.c b/net/mopd/files/patch-common_put.c new file mode 100644 index 000000000000..69613b0e7ea4 --- /dev/null +++ b/net/mopd/files/patch-common_put.c @@ -0,0 +1,50 @@ +--- common/put.c.orig 1996-08-16 22:43:15 UTC ++++ common/put.c +@@ -35,6 +35,9 @@ static char rcsid[] = "$Id: put.c,v 1.5 1996/08/16 22: + #include <sys/types.h> + #include <time.h> + #include "common/mopdef.h" ++#ifdef __FreeBSD__ ++#include <osreldate.h> ++#endif + + void + mopPutChar(pkt, index, value) +@@ -137,10 +140,7 @@ mopPutHeader(pkt, index, dst, src, proto, trans) + 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_8023) { + mopPutChar(pkt, index, (proto / 256)); + mopPutChar(pkt, index, (proto % 256)); +@@ -148,6 +148,9 @@ mopPutHeader(pkt, index, dst, src, proto, trans) + 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_ETHER) + mopPutShort(pkt, index, 0); +@@ -170,12 +173,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; + } |