mirror of
https://github.com/openwrt/packages.git
synced 2025-09-22 03:59:43 +00:00
Backport patches fixing compilation warning on 6.12+ kernel version. CC [M] /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.o /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:284:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration] 284 | const static ip_addr ip_zero = { IN6ADDR_ANY_INIT }; | ^~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:467:7: error: no previous prototype for 'get_num_rx_queues' [-Werror=missing-prototypes] 467 | u_int get_num_rx_queues(struct net_device *dev) | ^~~~~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:485:7: error: no previous prototype for 'lock_rss_queues' [-Werror=missing-prototypes] 485 | u_int lock_rss_queues(struct net_device *dev) | ^~~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:744:14: error: no previous prototype for 'netns_lookup' [-Werror=missing-prototypes] 744 | pf_ring_net *netns_lookup(struct net *net) { | ^~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:762:14: error: no previous prototype for 'netns_add' [-Werror=missing-prototypes] 762 | pf_ring_net *netns_add(struct net *net) { | ^~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:1017:17: error: no previous prototype for 'pf_ring_device_ifindex_lookup' [-Werror=missing-prototypes] 1017 | pf_ring_device *pf_ring_device_ifindex_lookup(struct net *net, int ifindex) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:1031:17: error: no previous prototype for 'pf_ring_device_name_lookup' [-Werror=missing-prototypes] 1031 | pf_ring_device *pf_ring_device_name_lookup(struct net *net /* namespace */, char *name) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:3467:5: error: no previous prototype for 'check_perfect_rules' [-Werror=missing-prototypes] 3467 | int check_perfect_rules(struct sk_buff *skb, | ^~~~~~~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:3541:5: error: no previous prototype for 'check_wildcard_rules' [-Werror=missing-prototypes] 3541 | int check_wildcard_rules(struct sk_buff *skb, | ^~~~~~~~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:3657:5: error: no previous prototype for 'bpf_filter_skb' [-Werror=missing-prototypes] 3657 | int bpf_filter_skb(struct sk_buff *skb, | ^~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:3711:5: error: no previous prototype for 'sample_packet' [-Werror=missing-prototypes] 3711 | int sample_packet(struct pf_ring_socket *pfr) { | ^~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:3731:11: error: no previous prototype for 'default_rehash_rss_func' [-Werror=missing-prototypes] 3731 | u_int32_t default_rehash_rss_func(struct sk_buff *skb, struct pfring_pkthdr *hdr) | ^~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:4477:6: error: no previous prototype for 'register_device_handler' [-Werror=missing-prototypes] 4477 | void register_device_handler(void) | ^~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:4486:6: error: no previous prototype for 'unregister_device_handler' [-Werror=missing-prototypes] 4486 | void unregister_device_handler(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:4724:6: error: no previous prototype for 'reserve_memory' [-Werror=missing-prototypes] 4724 | void reserve_memory(unsigned long base, unsigned long mem_len) | ^~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:4733:6: error: no previous prototype for 'unreserve_memory' [-Werror=missing-prototypes] 4733 | void unreserve_memory(unsigned long base, unsigned long mem_len) | ^~~~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:6038:14: error: no previous prototype for 'ring_poll' [-Werror=missing-prototypes] 6038 | unsigned int ring_poll(struct file *file, | ^~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:6130:23: error: no previous prototype for 'cluster_lookup' [-Werror=missing-prototypes] 6130 | ring_cluster_element *cluster_lookup(u_int32_t cluster_id) { | ^~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:6149:5: error: no previous prototype for 'get_first_available_cluster_queue' [-Werror=missing-prototypes] 6149 | int get_first_available_cluster_queue(ring_cluster_element *el) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:6162:24: error: no previous prototype for 'get_first_cluster_consumer' [-Werror=missing-prototypes] 6162 | struct pf_ring_socket *get_first_cluster_consumer(ring_cluster_element *el) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:6179:5: error: no previous prototype for 'add_sock_to_cluster_list' [-Werror=missing-prototypes] 6179 | int add_sock_to_cluster_list(ring_cluster_element *el, struct sock *sk, u_int16_t consumer_id) | ^~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:6231:5: error: no previous prototype for 'remove_from_cluster_list' [-Werror=missing-prototypes] 6231 | int remove_from_cluster_list(struct ring_cluster *cluster_ptr, struct sock *sock) | ^~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:6840:5: error: no previous prototype for 'setSocketStats' [-Werror=missing-prototypes] 6840 | int setSocketStats(struct pf_ring_socket *pfr) | ^~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:8266:6: error: no previous prototype for 'pf_ring_zc_dev_register' [-Werror=missing-prototypes] 8266 | void pf_ring_zc_dev_register(zc_dev_callbacks *callbacks, | ^~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:8351:6: error: no previous prototype for 'pf_ring_zc_dev_unregister' [-Werror=missing-prototypes] 8351 | void pf_ring_zc_dev_unregister(struct net_device *dev, u_int channel_id) | ^~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:8505:6: error: no previous prototype for 'remove_device_from_proc' [-Werror=missing-prototypes] 8505 | void remove_device_from_proc(pf_ring_net *netns, pf_ring_device *dev_ptr) { | ^~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:8540:6: error: no previous prototype for 'remove_device_from_ring_list' [-Werror=missing-prototypes] 8540 | void remove_device_from_ring_list(struct net_device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:8607:6: error: no previous prototype for 'add_device_to_proc' [-Werror=missing-prototypes] 8607 | void add_device_to_proc(pf_ring_net *netns, pf_ring_device *dev_ptr) { | ^~~~~~~~~~~~~~~~~~ /home/runner/work/openwrt-rebuilder/openwrt-rebuilder/original/build/SNAPSHOT/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/libpfring-8.6.1/kernel/pf_ring.c:8637:5: error: no previous prototype for 'add_device_to_ring_list' [-Werror=missing-prototypes] 8637 | int add_device_to_ring_list(struct net_device *dev, int32_t dev_index) | ^~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors While at it also refresh all the previous patch. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
91 lines
2.4 KiB
Makefile
91 lines
2.4 KiB
Makefile
#
|
|
# Copyright (C) 2017 Banglang Huang
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
include $(INCLUDE_DIR)/kernel.mk
|
|
|
|
PKG_NAME:=libpfring
|
|
PKG_VERSION:=8.6.1
|
|
PKG_RELEASE:=2
|
|
|
|
PKG_SOURCE_PROTO:=git
|
|
PKG_SOURCE_VERSION:=$(PKG_VERSION)
|
|
PKG_SOURCE_URL:=https://github.com/ntop/PF_RING
|
|
PKG_MIRROR_HASH:=2c4623e4a3cd601a94cfdaf748e0cd7aa93e8ec850d3cd4c2ec5d33419e45fbb
|
|
|
|
PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>
|
|
|
|
PKG_FIXUP:=patch-libtool
|
|
PKG_INSTALL:=1
|
|
PKG_BUILD_PARALLEL:=1
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
CONFIGURE_PATH:=userland
|
|
MAKE_PATH:=userland/lib
|
|
|
|
define Package/libpfring
|
|
SECTION:=libs
|
|
CATEGORY:=Libraries
|
|
TITLE:=Library for PR_RING (package process framework)
|
|
URL:=https://github.com/ntop/pf_ring
|
|
DEPENDS:=+kmod-pf-ring +libpcap +libpthread
|
|
LICENSE:=LGPL-2.1-or-later
|
|
LICENSE_FILES:=LICENSE
|
|
endef
|
|
|
|
define Package/libpfring/description
|
|
PF_RING is a high speed packet capture library that turns a commodity PC into an efficient and cheap
|
|
network measurement box suitable for both packet and active traffic analysis and manipulation.
|
|
Moreover, PF_RING opens totally new markets as it enables the creation of efficient application such as
|
|
traffic balancers or packet filters in a matter of lines of codes.
|
|
endef
|
|
|
|
define KernelPackage/pf-ring
|
|
SUBMENU:=Network Support
|
|
TITLE:=PF_RING Kernel driver
|
|
FILES:=$(PKG_BUILD_DIR)/kernel/pf_ring.ko
|
|
AUTOLOAD:=$(call AutoLoad,90,pf_ring,1)
|
|
LICENSE:=GPL-2.0-or-later
|
|
endef
|
|
|
|
define KernelPackage/pf-ring/description
|
|
Kernel module for libpf-ring package
|
|
endef
|
|
|
|
CONFIGURE_VARS += \
|
|
MACHINE="$(ARCH)" \
|
|
ac_cv_lib_nl_3_nl_socket_alloc=no
|
|
|
|
define Build/Compile
|
|
$(MAKE) -C "$(LINUX_DIR)" \
|
|
KERNEL_DIR="$(LINUX_DIR)" \
|
|
ARCH="$(LINUX_KARCH)" \
|
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
|
M="$(PKG_BUILD_DIR)/kernel" \
|
|
EXTRA_CFLAGS="$(EXTRA_CFLAGS) -I$(PKG_BUILD_DIR)/kernel" \
|
|
modules
|
|
$(call Build/Compile/Default)
|
|
endef
|
|
|
|
define Build/InstallDev
|
|
$(INSTALL_DIR) $(1)/usr/include/
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpfring.so* $(1)/usr/lib/
|
|
endef
|
|
|
|
define Package/libpfring/install
|
|
$(INSTALL_DIR) $(1)/usr/lib/
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpfring.so* $(1)/usr/lib/
|
|
$(LN) libpfring.so $(1)/usr/lib/libpfring.so.1
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,libpfring))
|
|
$(eval $(call KernelPackage,pf-ring))
|