[PATCH 2/2] libteam: add library to control team devices
Pavel Šimerda
code at simerda.eu
Wed Jan 13 21:38:48 EST 2021
---
package/network/services/libteam/Makefile | 30 +++++++++++++
.../0001-fix-build-on-OpenWRT-musl-libc.patch | 43 +++++++++++++++++++
2 files changed, 73 insertions(+)
create mode 100644 package/network/services/libteam/Makefile
create mode 100644 package/network/services/libteam/patches/0001-fix-build-on-OpenWRT-musl-libc.patch
diff --git a/package/network/services/libteam/Makefile b/package/network/services/libteam/Makefile
new file mode 100644
index 0000000000..367134656b
--- /dev/null
+++ b/package/network/services/libteam/Makefile
@@ -0,0 +1,30 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME := libteam
+PKG_FIXUP := autoreconf
+PKG_BUILD_DEPENDS := libdaemon jansson
+PKG_INSTALL := 1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL=https://github.com/jpirko/libteam.git
+PKG_SOURCE_DATE:=2021-01-12
+PKG_SOURCE_VERSION:=61efd6de2fbb8ee077863ee5a355ac3dfd9365b9
+
+PKG_LICENSE:=LGPL-2.1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libteam
+ SECTION := base
+ CATEGORY := Network
+ DEPENDS := +libnl +libnl-cli +libnl-core +libnl-genl +libnl-nf +libnl-route +libdaemon +jansson
+ TITLE := Library for controlling team network device
+ URL := http://libteam.org/
+endef
+
+define Package/libteam/install
+ $(INSTALL_DIR) $(1)/
+ $(CP) $(PKG_INSTALL_DIR)/. $(1)/
+endef
+
+$(eval $(call BuildPackage,libteam))
diff --git a/package/network/services/libteam/patches/0001-fix-build-on-OpenWRT-musl-libc.patch b/package/network/services/libteam/patches/0001-fix-build-on-OpenWRT-musl-libc.patch
new file mode 100644
index 0000000000..71b2b8abba
--- /dev/null
+++ b/package/network/services/libteam/patches/0001-fix-build-on-OpenWRT-musl-libc.patch
@@ -0,0 +1,43 @@
+From 5a5825708ba0bfcb7700a9fba4ea9f8c41c1ae6c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Pavel=20=C5=A0imerda?= <code at simerda.eu>
+Date: Tue, 5 Jan 2021 22:13:06 +0100
+Subject: [PATCH] fix build on OpenWRT/musl-libc
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Pavel Šimerda <code at simerda.eu>
+---
+ teamd/teamd_runner_lacp.c | 2 --
+ utils/teamnl.c | 1 +
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c
+index 9437f05..f524be2 100644
+--- a/teamd/teamd_runner_lacp.c
++++ b/teamd/teamd_runner_lacp.c
+@@ -23,9 +23,7 @@
+ #include <unistd.h>
+ #include <limits.h>
+ #include <sys/ioctl.h>
+-#include <linux/if_ether.h>
+ #include <sys/socket.h>
+-#include <linux/netdevice.h>
+ #include <netinet/in.h>
+ #include <errno.h>
+ #include <team.h>
+diff --git a/utils/teamnl.c b/utils/teamnl.c
+index c53345d..ec2b435 100644
+--- a/utils/teamnl.c
++++ b/utils/teamnl.c
+@@ -24,6 +24,7 @@
+ #include <getopt.h>
+ #include <errno.h>
+ #include <sys/signalfd.h>
++#include <sys/select.h>
+ #include <signal.h>
+ #include <unistd.h>
+ #include <team.h>
+--
+2.29.2
+
--
2.29.2
More information about the openwrt-devel
mailing list