iperf3: fix build with gcc-15
PATCH 1/2 iperf3: fix build with gcc-15
From: Martin Jansa <[email protected]>
* fixes:
http://errors.yoctoproject.org/Errors/Details/848456/
Signed-off-by Martin Jansa <[email protected]>
--- .../iperf3/0001-fix-build-with-gcc-15.patch | 66 +++++++++++++++++++ .../recipes-benchmark/iperf3/iperf3_3.17.1.bb | 1 + 2 files changed, 67 insertions(+) create mode 100644 meta-oe/recipes-benchmark/iperf3/iperf3/0001-fix-build-with-gcc-15.patch
meta-oe/recipes-benchmark/iperf3/iperf3/0001-fix-build-with-gcc-15.patch new file +66 -0
@@ -0,0 +1,66 @@ +From a46630d4e373e9a3ef974c1b67767f6816c66572 Mon Sep 17 00:00:00 2001 +From: Rudi Heitbaum <[email protected]> +Date: Mon, 9 Dec 2024 10:13:02 +0000 +Subject: [PATCH] fix build with gcc-15 + +Upstream-Status: Submitted [https://github.com/esnet/iperf/pull/1805] + +Signed-off-by: Martin Jansa <[email protected]> +--- + src/iperf_api.c | 8 ++++---- + src/iperf_api.h | 8 ++++---- + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/src/iperf_api.c b/src/iperf_api.c +index 7fb741e..4bb5b2f 100644 +--- a/src/iperf_api.c ++++ b/src/iperf_api.c +@@ -599,25 +599,25 @@ iperf_set_mapped_v4(struct iperf_test *ipt, const int val) + } + + void +-iperf_set_on_new_stream_callback(struct iperf_test* ipt, void (*callback)()) ++iperf_set_on_new_stream_callback(struct iperf_test* ipt, void (*callback)(struct iperf_stream *)) + { + ipt->on_new_stream = callback; + } + + void +-iperf_set_on_test_start_callback(struct iperf_test* ipt, void (*callback)()) ++iperf_set_on_test_start_callback(struct iperf_test* ipt, void (*callback)(struct iperf_test *)) + { + ipt->on_test_start = callback; + } + + void +-iperf_set_on_test_connect_callback(struct iperf_test* ipt, void (*callback)()) ++iperf_set_on_test_connect_callback(struct iperf_test* ipt, void (*callback)(struct iperf_test *)) + { + ipt->on_connect = callback; + } + + void +-iperf_set_on_test_finish_callback(struct iperf_test* ipt, void (*callback)()) ++iperf_set_on_test_finish_callback(struct iperf_test* ipt, void (*callback)(struct iperf_test *)) + { + ipt->on_test_finish = callback; + } +diff --git a/src/iperf_api.h b/src/iperf_api.h +index 1313142..df10c38 100644 +--- a/src/iperf_api.h ++++ b/src/iperf_api.h +@@ -213,10 +213,10 @@ void iperf_set_dont_fragment( struct iperf_test* ipt, int dont_fragment ); + void iperf_set_test_congestion_control(struct iperf_test* ipt, char* cc); + void iperf_set_test_mss(struct iperf_test* ipt, int mss); + void iperf_set_mapped_v4(struct iperf_test* ipt, const int val); +-void iperf_set_on_new_stream_callback(struct iperf_test* ipt, void (*callback)()); +-void iperf_set_on_test_start_callback(struct iperf_test* ipt, void (*callback)()); +-void iperf_set_on_test_connect_callback(struct iperf_test* ipt, void (*callback)()); +-void iperf_set_on_test_finish_callback(struct iperf_test* ipt, void (*callback)()); ++void iperf_set_on_new_stream_callback(struct iperf_test* ipt, void (*callback)(struct iperf_stream *)); ++void iperf_set_on_test_start_callback(struct iperf_test* ipt, void (*callback)(struct iperf_test *)); ++void iperf_set_on_test_connect_callback(struct iperf_test* ipt, void (*callback)(struct iperf_test *)); ++void iperf_set_on_test_finish_callback(struct iperf_test* ipt, void (*callback)(struct iperf_test *)); + + #if defined(HAVE_SSL) + void iperf_set_test_client_username(struct iperf_test *ipt, const char *client_username);
meta-oe/recipes-benchmark/iperf3/iperf3_3.17.1.bb +1 -0
@@ -16,6 +16,7 @@ SRC_URI = "git://github.com/esnet/iperf.git;branch=master;protocol=https \ file://0002-Remove-pg-from-profile_CFLAGS.patch \ file://0001-configure.ac-check-for-CPP-prog.patch \ file://do-not-listen-to-old-udp-prot-listener.patch \ + file://0001-fix-build-with-gcc-15.patch \ " SRCREV = "2acfcfe94e928e74542c9f107e02aa6dd4748a79"
PATCH 2/2 android-tools: fix build with gcc-15
From: Martin Jansa <[email protected]>
* fixes build with gcc-15:
http://errors.yoctoproject.org/Errors/Details/848455/
Signed-off-by Martin Jansa <[email protected]>
--- ...unused-parameter-from-allocate_inode.patch | 69 +++++++++++++++++++ .../android-tools/android-tools_5.1.1.r37.bb | 1 + 2 files changed, 70 insertions(+) create mode 100644 meta-oe/recipes-devtools/android-tools/android-tools/extras/0003-ext4_utils-drop-unused-parameter-from-allocate_inode.patch
meta-oe/recipes-devtools/android-tools/android-tools/extras/0003-ext4_utils-drop-unused-parameter-from-allocate_inode.patch new file +69 -0
@@ -0,0 +1,69 @@ +From c9f8cb184a7218c97ff966db44da6dd814c0e273 Mon Sep 17 00:00:00 2001 +From: Martin Jansa <[email protected]> +Date: Fri, 21 Mar 2025 09:49:32 +0000 +Subject: [PATCH] ext4_utils: drop unused parameter from allocate_inode() + +* fixes build with gcc-15: + http://errors.yoctoproject.org/Errors/Details/848455/ + +TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/contents.c: In function 'make_directory': +TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/contents.c:115:29: error: too many arguments to function 'allocate_inode'; expected 0, have 1 + 115 | inode_num = allocate_inode(info); + | ^~~~~~~~~~~~~~ ~~~~ +In file included from TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/contents.c:32: +TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/allocate.h:61:5: note: declared here + 61 | u32 allocate_inode(); + | ^~~~~~~~~~~~~~ +TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/contents.c: In function 'make_file': +TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/contents.c:183:21: error: too many arguments to function 'allocate_inode'; expected 0, have 1 + 183 | inode_num = allocate_inode(info); + | ^~~~~~~~~~~~~~ ~~~~ +TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/allocate.h:61:5: note: declared here + 61 | u32 allocate_inode(); + | ^~~~~~~~~~~~~~ +TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/contents.c: In function 'make_link': +TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/contents.c:218:21: error: too many arguments to function 'allocate_inode'; expected 0, have 1 + 218 | inode_num = allocate_inode(info); + | ^~~~~~~~~~~~~~ ~~~~ +TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/allocate.h:61:5: note: declared here + 61 | u32 allocate_inode(); + | ^~~~~~~~~~~~~~ +make: *** [<builtin>: contents.o] Error 1 + +Upstream-Status: Pending [this whole code was removed in newer version android-9.0.0_r1 https://android.googlesource.com/platform/system/extras/+/7a837fcd6e9c0e0219f743052c78cc1c5988dfaf] +Signed-off-by: Martin Jansa <[email protected]> +--- + ext4_utils/contents.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/ext4_utils/contents.c b/ext4_utils/contents.c +index 3144de93f..ac1b71706 100644 +--- a/ext4_utils/contents.c ++++ b/ext4_utils/contents.c +@@ -112,7 +112,7 @@ u32 make_directory(u32 dir_inode_num, u32 entries, struct dentry *dentries, + len = blocks * info.block_size; + + if (dir_inode_num) { +- inode_num = allocate_inode(info); ++ inode_num = allocate_inode(); + } else { + dir_inode_num = EXT4_ROOT_INO; + inode_num = EXT4_ROOT_INO; +@@ -180,7 +180,7 @@ u32 make_file(const char *filename, u64 len) + struct ext4_inode *inode; + u32 inode_num; + +- inode_num = allocate_inode(info); ++ inode_num = allocate_inode(); + if (inode_num == EXT4_ALLOCATE_FAILED) { + error("failed to allocate inode\n"); + return EXT4_ALLOCATE_FAILED; +@@ -215,7 +215,7 @@ u32 make_link(const char *link) + u32 inode_num; + u32 len = strlen(link); + +- inode_num = allocate_inode(info); ++ inode_num = allocate_inode(); + if (inode_num == EXT4_ALLOCATE_FAILED) { + error("failed to allocate inode\n"); + return EXT4_ALLOCATE_FAILED;
meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb +1 -0
@@ -48,6 +48,7 @@ SRC_URI = " \ file://core/0001-memory.h-Always-define-strlcpy-for-glibc-based-syste.patch;patchdir=system/core \ file://extras/0001-ext4_utils-remove-selinux-extensions.patch;patchdir=system/extras \ file://extras/0002-ext4_utils-add-o-argument-to-preserve-ownership.patch;patchdir=system/extras \ + file://extras/0003-ext4_utils-drop-unused-parameter-from-allocate_inode.patch;patchdir=system/extras \ file://libselinux/0001-Remove-bionic-specific-calls.patch;patchdir=external/libselinux \ file://libselinux/0001-libselinux-Do-not-define-gettid-if-glibc-2.30-is-use.patch;patchdir=external/libselinux \ file://android-tools-adbd.service \