Files
meta-openembedded/meta-networking/recipes-support/netperf/netperf_git.bb
T
mark.yang cf98490262 netperf: fix build error with gcc-15
* submit fix:
  https://github.com/HewlettPackard/netperf/pull/86
  to fix:
  http://errors.yoctoproject.org/Errors/Details/851803/
    ../../git/src/nettest_bsd.c:4497:19: error: too many arguments to function 'alloc_sendfile_buf_ring'; expected 0, have 4
    4497 |       send_ring = alloc_sendfile_buf_ring(send_width,
        |                   ^~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
    In file included from ../../git/src/nettest_bsd.c:175:
    ../../git/src/netlib.h:690:26: note: declared here
    690 | extern  struct ring_elt *alloc_sendfile_buf_ring();
        |                          ^~~~~~~~~~~~~~~~~~~~~~~
    In file included from ../../git/src/nettest_omni.c:184:
    ../../git/src/hist.h:135:6: error: conflicting types for 'HIST_purge'; have 'void(struct histogram_struct *)'
    135 | void HIST_purge(HIST h);
        |      ^~~~~~~~~~
  ...

Signed-off-by: mark.yang <mark.yang@lge.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-04-19 14:36:02 -07:00

71 lines
2.8 KiB
BlitzBasic

SUMMARY = "A networking benchmarking tool"
DESCRIPTION = "Network performance benchmark including tests for TCP, UDP, sockets, ATM and more."
SECTION = "net"
HOMEPAGE = "http://www.netperf.org/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=e661ab33a2a71ad6652c178dedf8aaa2"
PV = "2.7.0+git"
SRC_URI = "git://github.com/HewlettPackard/netperf.git;branch=master;protocol=https \
file://cpu_set.patch \
file://vfork.patch \
file://init \
file://netserver.service \
file://0001-netlib.c-Move-including-sched.h-out-og-function.patch \
file://0001-nettest_omni-Remove-duplicate-variable-definitions.patch \
file://netserver_permissions.patch \
file://0001-Makefile.am-add-ACLOCAL_AMFLAGS.patch \
file://0001-Fix-too-many-arguments-error-occurring-in-gcc-15.patch \
"
SRCREV = "3bc455b23f901dae377ca0a558e1e32aa56b31c4"
S = "${WORKDIR}/git"
inherit update-rc.d autotools texinfo systemd
# cpu_set.patch plus _GNU_SOURCE makes src/netlib.c compile with CPU_ macros
CFLAGS:append = " -DDO_UNIX -DDO_IPV6 -D_GNU_SOURCE"
# set the "_FILE_OFFSET_BITS" preprocessor symbol to 64 to support files
# larger than 2GB
CFLAGS:append = " -D_FILE_OFFSET_BITS=64"
PACKAGECONFIG ??= ""
PACKAGECONFIG[sctp] = "--enable-sctp,--disable-sctp,lksctp-tools,"
PACKAGECONFIG[intervals] = "--enable-intervals,--disable-intervals,,"
PACKAGECONFIG[histogram] = "--enable-histogram,--disable-histogram,,"
do_install() {
sed -e 's#/usr/sbin/#${sbindir}/#g' -i ${UNPACKDIR}/init
install -d ${D}${sbindir} ${D}${bindir} ${D}${sysconfdir}/init.d ${D}${systemd_system_unitdir}
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
sed -e 's#/usr/sbin/#${sbindir}/#g' ${UNPACKDIR}/netserver.service > ${D}${systemd_system_unitdir}/netserver.service
fi
install -m 4755 src/netperf ${D}${bindir}
install -m 4755 src/netserver ${D}${sbindir}
install -m 0755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/netperf
# man
install -d ${D}${mandir}/man1/
install -m 0644 ${S}/doc/netserver.man ${D}${mandir}/man1/netserver.1
install -m 0644 ${S}/doc/netperf.man ${D}${mandir}/man1/netperf.1
# move scripts to examples directory
install -d ${D}${docdir}/netperf/examples
install -m 0644 ${S}/doc/examples/*_script ${D}${docdir}/netperf/examples/
# docs ..
install -m 0644 ${S}/COPYING ${D}${docdir}/netperf
install -m 0644 ${S}/Release_Notes ${D}${docdir}/netperf
install -m 0644 ${S}/README ${D}${docdir}/netperf
install -m 0644 ${S}/doc/netperf_old.ps ${D}${docdir}/netperf
}
RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'sctp', 'kernel-module-sctp', '', d)}"
INITSCRIPT_NAME = "netperf"
INITSCRIPT_PARAMS = "defaults"
SYSTEMD_SERVICE:${PN} = "netserver.service"