1Fix build without ASYNC_IO
2
3Fix the following build failure without ASYNC_IO:
4
5/home/buildroot/autobuild/run/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mipsel-buildroot-linux-uclibc/12.3.0/../../../../mipsel-buildroot-linux-uclibc/bin/ld: iozone_linux-noaio.o: in function `read_perf_test':
6iozone.c:(.text+0x11a74): undefined reference to `end_async'
7
8Fixes:
9 - http://autobuild.buildroot.org/results/31a4f0ac9eeb71df5d2f40ffe9f1f256cb58e399
10
11Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
12Upstream: sent to capps@iozone.org
13
14diff '--color=auto' -Nura iozone3_506.orig/src/current/iozone.c iozone3_506/src/current/iozone.c
15--- iozone3_506.orig/src/current/iozone.c	2024-03-06 12:28:16.734023725 +0100
16+++ iozone3_506/src/current/iozone.c	2024-03-06 12:39:14.453991162 +0100
17@@ -9153,6 +9153,7 @@
18 				}
19 			  }
20 			}
21+#ifdef ASYNC_IO
22 			if(async_flag)
23 			{
24 				if(no_copy_flag)
25@@ -9160,6 +9161,7 @@
26 				end_async(gc);
27 				gc=0;
28 			}
29+#endif
30 			buffer1=0;
31 			if(hist_summary)
32 			{
33@@ -9634,6 +9636,7 @@
34 				}
35 			  }
36 			}
37+#ifdef ASYNC_IO
38 			if(async_flag)
39 			{
40 				if(no_copy_flag)
41@@ -9641,6 +9644,7 @@
42 				end_async(gc);
43 				gc=0;
44 			}
45+#endif
46 			if(rlocking)
47 			{
48 				lock_offset=I_LSEEK(fd,0,SEEK_CUR);
49@@ -10097,6 +10101,7 @@
50 				}
51 			   }
52 			}
53+#ifdef ASYNC_IO
54 			if(async_flag)
55 			{
56 				if(no_copy_flag)
57@@ -10104,6 +10109,7 @@
58 				end_async(gc);
59 				gc=0;
60 			}
61+#endif
62 			if(rlocking)
63 			{
64 				mylockr((int) fd, (int) 0, (int)1,
65@@ -10749,6 +10755,7 @@
66 			   }
67 			}
68 		}
69+#ifdef ASYNC_IO
70 		if(async_flag)
71 		{
72 			if(no_copy_flag)
73@@ -10756,6 +10763,7 @@
74 			end_async(gc);
75 			gc=0;
76 		}
77+#endif
78
79 		/* This is a bit tricky.  The goal is to read with a stride through
80 		   the file. The problem is that you need to touch all of the file
81@@ -15485,6 +15493,7 @@
82 			   }
83 		   }
84 		}
85+#ifdef ASYNC_IO
86 		if(async_flag)
87 		{
88 			if(no_copy_flag)
89@@ -15492,6 +15501,7 @@
90 			end_async(gc);
91 			gc=0;
92 		}
93+#endif
94 		read_so_far+=reclen/1024;
95 		r_traj_bytes_completed+=reclen;
96 		r_traj_ops_completed++;
97@@ -16050,6 +16060,7 @@
98 			   }
99 		   }
100 		}
101+#ifdef ASYNC_IO
102 		if(async_flag)
103 		{
104 			if(no_copy_flag)
105@@ -16057,6 +16068,7 @@
106 			end_async(gc);
107 			gc=0;
108 		}
109+#endif
110 		read_so_far+=reclen/1024;
111 		r_traj_bytes_completed+=reclen;
112 		r_traj_ops_completed++;
113@@ -16665,6 +16677,7 @@
114 			}
115 		   }
116 		}
117+#ifdef ASYNC_IO
118 		if(async_flag)
119 		{
120 			if(no_copy_flag)
121@@ -16672,6 +16685,7 @@
122 			end_async(gc);
123 			gc=0;
124 		}
125+#endif
126 		re_read_so_far+=reclen/1024;
127 		r_traj_bytes_completed+=reclen;
128 		r_traj_ops_completed++;
129@@ -17244,6 +17258,7 @@
130 			  lock_offset, reclen);
131 		}
132 		current_position+=reclen;
133+#ifdef ASYNC_IO
134 		if(async_flag)
135 		{
136 			if(no_copy_flag)
137@@ -17251,6 +17266,7 @@
138 			end_async(gc);
139 			gc=0;
140 		}
141+#endif
142 		t_offset = (off64_t)reclen*2;
143 		if (!(h_flag || k_flag || mmapflag))
144 		{
145@@ -17778,6 +17794,7 @@
146 			}
147 		   }
148 		}
149+#ifdef ASYNC_IO
150 		if(async_flag)
151 		{
152 			if(no_copy_flag)
153@@ -17785,6 +17802,7 @@
154 			end_async(gc);
155 			gc=0;
156 		}
157+#endif
158 		if(current_position + (stride * reclen) >= (numrecs64 * reclen)-reclen)
159 		{
160 			current_position=0;
161@@ -18528,6 +18546,7 @@
162 			}
163 		   }
164 		}
165+#ifdef ASYNC_IO
166 		if(async_flag)
167 		{
168 			if(no_copy_flag)
169@@ -18535,6 +18554,7 @@
170 			end_async(gc);
171 			gc=0;
172 		}
173+#endif
174 		ranread_so_far+=reclen/1024;
175 		if(*stop_flag)
176 		{
177