summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/netperf/files/0001-Fix-too-many-arguments-error-occurring-in-gcc-15.patch
blob: 51313d80558d054f15398dd8393b73e299d84024 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
From fd4f2099efd378a3e00809b485ae22ebf20ab0f7 Mon Sep 17 00:00:00 2001
From: "mark.yang" <mark.yang@lge.com>
Date: Wed, 16 Apr 2025 20:02:36 +0900
Subject: [PATCH] Fix too many arguments error occurring in gcc-15

* See more details in 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);
      |      ^~~~~~~~~~
In file included from ../../git/src/nettest_omni.c:166:
../../git/src/netlib.h:651:17: note: previous declaration of 'HIST_purge' with type 'void(void)'
  651 | extern void     HIST_purge();
      |                 ^~~~~~~~~~
../../git/src/nettest_bsd.c: In function 'recv_tcp_stream':
../../git/src/nettest_bsd.c:5197:15: error: too many arguments to function 'allocate_buffer_ring'; expected 0, have 4
 5197 |   recv_ring = allocate_buffer_ring(recv_width,
      |               ^~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
../../git/src/netlib.h:679:26: note: declared here
  679 | extern  struct ring_elt *allocate_buffer_ring();
      |                          ^~~~~~~~~~~~~~~~~~~~
../../git/src/nettest_bsd.c: In function 'recv_tcp_maerts':
../../git/src/nettest_bsd.c:5617:15: error: too many arguments to function 'allocate_buffer_ring'; expected 0, have 4
 5617 |   send_ring = allocate_buffer_ring(send_width,
      |               ^~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
../../git/src/netlib.h:679:26: note: declared here
  679 | extern  struct ring_elt *allocate_buffer_ring();
      |                          ^~~~~~~~~~~~~~~~~~~~
../../git/src/nettest_bsd.c: In function 'recv_udp_stream':
../../git/src/nettest_bsd.c:7345:15: error: too many arguments to function 'allocate_buffer_ring'; expected 0, have 4
 7345 |   recv_ring = allocate_buffer_ring(recv_width,
      |               ^~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
../../git/src/netlib.h:679:26: note: declared here
  679 | extern  struct ring_elt *allocate_buffer_ring();
      |                          ^~~~~~~~~~~~~~~~~~~~
../../git/src/nettest_bsd.c: In function 'recv_udp_rr':
../../git/src/nettest_bsd.c:8360:15: error: too many arguments to function 'allocate_buffer_ring'; expected 0, have 4
 8360 |   recv_ring = allocate_buffer_ring(recv_width,
      |               ^~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
../../git/src/netlib.h:679:26: note: declared here
  679 | extern  struct ring_elt *allocate_buffer_ring();
      |                          ^~~~~~~~~~~~~~~~~~~~
../../git/src/nettest_bsd.c:8365:15: error: too many arguments to function 'allocate_buffer_ring'; expected 0, have 4
 8365 |   send_ring = allocate_buffer_ring(send_width,
      |               ^~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
../../git/src/netlib.h:679:26: note: declared here
  679 | extern  struct ring_elt *allocate_buffer_ring();
      |                          ^~~~~~~~~~~~~~~~~~~~
../../git/src/nettest_bsd.c: In function 'recv_tcp_rr':
../../git/src/nettest_bsd.c:8677:15: error: too many arguments to function 'allocate_buffer_ring'; expected 0, have 4
 8677 |   send_ring = allocate_buffer_ring(send_width,
      |               ^~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
../../git/src/netlib.h:679:26: note: declared here
  679 | extern  struct ring_elt *allocate_buffer_ring();
      |                          ^~~~~~~~~~~~~~~~~~~~
../../git/src/nettest_bsd.c:8682:15: error: too many arguments to function 'allocate_buffer_ring'; expected 0, have 4
 8682 |   recv_ring = allocate_buffer_ring(recv_width,
      |               ^~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
../../git/src/netlib.h:679:26: note: declared here
  679 | extern  struct ring_elt *allocate_buffer_ring();
      |                          ^~~~~~~~~~~~~~~~~~~~
../../git/src/nettest_omni.c: In function 'send_omni_inner':
../../git/src/nettest_omni.c:4044:21: error: too many arguments to function 'allocate_buffer_ring'; expected 0, have 4
 4044 |         send_ring = allocate_buffer_ring(send_width,
      |                     ^~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
../../git/src/netlib.h:679:26: note: declared here
  679 | extern  struct ring_elt *allocate_buffer_ring();
      |                          ^~~~~~~~~~~~~~~~~~~~
../../git/src/nettest_omni.c:4086:21: error: too many arguments to function 'allocate_buffer_ring'; expected 0, have 4
 4086 |         recv_ring = allocate_buffer_ring(recv_width,
      |                     ^~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
../../git/src/netlib.h:679:26: note: declared here
  679 | extern  struct ring_elt *allocate_buffer_ring();
      |                          ^~~~~~~~~~~~~~~~~~~~
../../git/src/nettest_omni.c:5050:5: error: too many arguments to function 'HIST_get_stats'; expected 0, have 5
 5050 |     HIST_get_stats(time_hist,
      |     ^~~~~~~~~~~~~~ ~~~~~~~~~
../../git/src/netlib.h:650:17: note: declared here
  650 | extern void     HIST_get_stats();
      |                 ^~~~~~~~~~~~~~
../../git/src/nettest_omni.c:5055:19: error: too many arguments to function 'HIST_get_percentile'; expected 0, have 2
 5055 |     p50_latency = HIST_get_percentile(time_hist, 0.50);
      |                   ^~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
../../git/src/netlib.h:649:17: note: declared here
  649 | extern int      HIST_get_percentile();
      |                 ^~~~~~~~~~~~~~~~~~~
../../git/src/nettest_omni.c:5056:19: error: too many arguments to function 'HIST_get_percentile'; expected 0, have 2
 5056 |     p90_latency = HIST_get_percentile(time_hist, 0.90);
      |                   ^~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
../../git/src/netlib.h:649:17: note: declared here
  649 | extern int      HIST_get_percentile();
      |                 ^~~~~~~~~~~~~~~~~~~
../../git/src/nettest_omni.c:5057:19: error: too many arguments to function 'HIST_get_percentile'; expected 0, have 2
 5057 |     p99_latency = HIST_get_percentile(time_hist, 0.99);
      |                   ^~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
../../git/src/netlib.h:649:17: note: declared here
  649 | extern int      HIST_get_percentile();
      |                 ^~~~~~~~~~~~~~~~~~~
../../git/src/nettest_omni.c: In function 'recv_omni':
../../git/src/nettest_omni.c:5354:17: error: too many arguments to function 'allocate_buffer_ring'; expected 0, have 4
 5354 |     send_ring = allocate_buffer_ring(send_width,
      |                 ^~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
../../git/src/netlib.h:679:26: note: declared here
  679 | extern  struct ring_elt *allocate_buffer_ring();
      |                          ^~~~~~~~~~~~~~~~~~~~
../../git/src/nettest_omni.c:5396:17: error: too many arguments to function 'allocate_buffer_ring'; expected 0, have 4
 5396 |     recv_ring = allocate_buffer_ring(recv_width,
      |                 ^~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
../../git/src/netlib.h:679:26: note: declared here
  679 | extern  struct ring_elt *allocate_buffer_ring();
      |                          ^~~~~~~~~~~~~~~~~~~~

Upstream-Status: Submitted [https://github.com/HewlettPackard/netperf/pull/86]
Signed-off-by: mark.yang <mark.yang@lge.com>
---
 src/netlib.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/netlib.h b/src/netlib.h
index b1f4199..8e1f6fe 100644
--- a/src/netlib.h
+++ b/src/netlib.h
@@ -564,6 +564,7 @@ extern void   demo_interval_final();
 #endif
 #endif
 
+#include "hist.h"
 extern  void    netlib_init();
 extern  int     netlib_get_page_size();
 extern  void    install_signal_catchers();
@@ -646,9 +647,9 @@ extern char     *find_interface_slot(char *interface_name);
 extern void     find_interface_ids(char *interface_name, int *vendor, int *device, int *sub_vend, int *sub_dev);
 extern void     find_driver_info(char *ifname, char *driver, char *version, char *firmware, char *bus, int len);
 extern void     find_system_info(char **system_model, char **cpu_model, int *cpu_frequency);
-extern int      HIST_get_percentile();
-extern void     HIST_get_stats();
-extern void     HIST_purge();
+extern int      HIST_get_percentile(HIST h, const double percentile);
+extern void     HIST_get_stats(HIST h, int *min, int *max, double *mean, double *stddev);
+extern void     HIST_purge(HIST h);
 extern void     find_security_info(int *enabled, int *type, char **specific);
 extern void     demo_first_timestamp();
 extern void     demo_reset();
@@ -676,7 +677,7 @@ extern  void    catcher(int, siginfo_t *,void *);
 #else
 extern  void    catcher(int);
 #endif /* __hpux */
-extern  struct ring_elt *allocate_buffer_ring();
+extern  struct ring_elt *allocate_buffer_ring(int recv_width, int recv_size, int local_recv_align, int local_recv_offset);
 extern void access_buffer(char *buffer_ptr,
 			  int length,
 			  int dirty_count,
@@ -687,7 +688,7 @@ extern  struct ring_elt *allocate_exs_buffer_ring();
 #endif /* HAVE_ICSC_EXS */
 
 #ifdef HAVE_SENDFILE
-extern  struct ring_elt *alloc_sendfile_buf_ring();
+extern  struct ring_elt *alloc_sendfile_buf_ring(int send_width, int send_size, int local_send_align, int local_send_offset);
 extern  int netperf_sendfile(SOCKET send_socket, struct ring_elt *send_ring);
 #endif /* HAVE_SENDFILE */