Skip to content
Snippets Groups Projects
Commit fb22e1c2 authored by Nuno Teixeira's avatar Nuno Teixeira
Browse files

net/sflowtool: Update to 6.01

- Add patch to fix build on versions that do not have glibc/linux
  compatible byteswap.h

ChangeLog: https://github.com/sflow/sflowtool/releases/tag/v6.01
parent 7ed99c3c
No related branches found
No related tags found
No related merge requests found
PORTNAME= sflowtool
DISTVERSIONPREFIX= v
DISTVERSION= 5.08
DISTVERSION= 6.01
CATEGORIES= net
MAINTAINER= eduardo@FreeBSD.org
......@@ -26,6 +26,13 @@ PORTEXAMPLES= sflowenable
OPTIONS_DEFINE= DOCS EXAMPLES
.include <bsd.port.options.mk>
# Patch byteswap.h where not available
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1301511
EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src_sflowtool.c
.endif
post-install:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
......
TIMESTAMP = 1667822009
SHA256 (sflow-sflowtool-v5.08_GH0.tar.gz) = 70a1930e1a99077c0cf92d4205c744aaeaadb794927bae8b98463075432b4a8a
SIZE (sflow-sflowtool-v5.08_GH0.tar.gz) = 79065
TIMESTAMP = 1679650144
SHA256 (sflow-sflowtool-v6.01_GH0.tar.gz) = 4cc9f4512a3dcb7da6a970b1de06e3f2fcb599a605e9cfeddd34bd7b9b687f3c
SIZE (sflow-sflowtool-v6.01_GH0.tar.gz) = 81155
--- src/sflowtool.c.orig 2023-03-23 17:36:24 UTC
+++ src/sflowtool.c
@@ -29,13 +29,21 @@ extern "C" {
#include <inttypes.h>
#include <arpa/inet.h>
#include <netdb.h>
-#include <byteswap.h>
+#include <sys/endian.h>
#include <getopt.h>
#include "sflow.h" /* sFlow v5 */
#include "sflow_v2v4.h" /* sFlow v2/4 */
#include "assert.h"
#include "sflow_xdr.h" /* sFlow encode */
+
+#define __bswap_16(x) __bswap16(x)
+#define __bswap_32(x) __bswap32(x)
+#define __bswap_64(x) __bswap64(x)
+
+#define bswap_16(x) __bswap16(x)
+#define bswap_32(x) __bswap32(x)
+#define bswap_64(x) __bswap64(x)
#define SPOOFSOURCE 1
#define YES 1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment