From e2e222871c74b0483267443383238c008eca2fb4 Mon Sep 17 00:00:00 2001 From: Ted Hess Date: Sun, 7 Aug 2016 16:14:09 -0400 Subject: [PATCH] tcpreplay: Fix builds - musl compatibility Signed-off-by: Ted Hess --- net/tcpreplay/Makefile | 2 +- .../patches/010-musl_compatibility.patch | 31 +++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 net/tcpreplay/patches/010-musl_compatibility.patch diff --git a/net/tcpreplay/Makefile b/net/tcpreplay/Makefile index a0c9710e3..627abc5fd 100644 --- a/net/tcpreplay/Makefile +++ b/net/tcpreplay/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tcpreplay PKG_VERSION:=4.1.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/appneta/tcpreplay/releases/download/v$(PKG_VERSION) diff --git a/net/tcpreplay/patches/010-musl_compatibility.patch b/net/tcpreplay/patches/010-musl_compatibility.patch new file mode 100644 index 000000000..5b2735e07 --- /dev/null +++ b/net/tcpreplay/patches/010-musl_compatibility.patch @@ -0,0 +1,31 @@ +--- a/src/common/fakepoll.h ++++ b/src/common/fakepoll.h +@@ -40,11 +40,11 @@ + #define POLL_NO_WARN + #define SYS_POLL_NO_WARN + +-#ifdef HAVE_SYS_POLL_H +-#include +-#define __FAKEPOLL_H +-#elif HAVE_POLL_H ++#ifdef HAVE_POLL_H + #include ++#define __FAKEPOLL_H ++#elif HAVE_SYS_POLL_H ++#include + #define __FAKEPOLL_H + #endif + +--- a/src/common/sendpacket.c ++++ b/src/common/sendpacket.c +@@ -148,10 +148,6 @@ + #include "txring.h" + #endif + +-#ifndef __GLIBC__ +-typedef int socklen_t; +-#endif +- + static sendpacket_t *sendpacket_open_pf(const char *, char *); + static struct tcpr_ether_addr *sendpacket_get_hwaddr_pf(sendpacket_t *); + static int get_iface_index(int fd, const char *device, char *);