xref: /aosp_15_r20/external/strace/tests-m32/preadv2-pwritev2.c (revision cf84ac9a129d8ea9952db616b4e9b904c4bdde56)
1*cf84ac9aSAndroid Build Coastguard Worker /*
2*cf84ac9aSAndroid Build Coastguard Worker  * Check decoding of preadv2 and pwritev2 syscalls.
3*cf84ac9aSAndroid Build Coastguard Worker  *
4*cf84ac9aSAndroid Build Coastguard Worker  * Copyright (c) 2016 Dmitry V. Levin <[email protected]>
5*cf84ac9aSAndroid Build Coastguard Worker  * Copyright (c) 2016-2018 The strace developers.
6*cf84ac9aSAndroid Build Coastguard Worker  * All rights reserved.
7*cf84ac9aSAndroid Build Coastguard Worker  *
8*cf84ac9aSAndroid Build Coastguard Worker  * Redistribution and use in source and binary forms, with or without
9*cf84ac9aSAndroid Build Coastguard Worker  * modification, are permitted provided that the following conditions
10*cf84ac9aSAndroid Build Coastguard Worker  * are met:
11*cf84ac9aSAndroid Build Coastguard Worker  * 1. Redistributions of source code must retain the above copyright
12*cf84ac9aSAndroid Build Coastguard Worker  *    notice, this list of conditions and the following disclaimer.
13*cf84ac9aSAndroid Build Coastguard Worker  * 2. Redistributions in binary form must reproduce the above copyright
14*cf84ac9aSAndroid Build Coastguard Worker  *    notice, this list of conditions and the following disclaimer in the
15*cf84ac9aSAndroid Build Coastguard Worker  *    documentation and/or other materials provided with the distribution.
16*cf84ac9aSAndroid Build Coastguard Worker  * 3. The name of the author may not be used to endorse or promote products
17*cf84ac9aSAndroid Build Coastguard Worker  *    derived from this software without specific prior written permission.
18*cf84ac9aSAndroid Build Coastguard Worker  *
19*cf84ac9aSAndroid Build Coastguard Worker  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20*cf84ac9aSAndroid Build Coastguard Worker  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21*cf84ac9aSAndroid Build Coastguard Worker  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22*cf84ac9aSAndroid Build Coastguard Worker  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23*cf84ac9aSAndroid Build Coastguard Worker  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24*cf84ac9aSAndroid Build Coastguard Worker  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25*cf84ac9aSAndroid Build Coastguard Worker  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26*cf84ac9aSAndroid Build Coastguard Worker  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27*cf84ac9aSAndroid Build Coastguard Worker  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28*cf84ac9aSAndroid Build Coastguard Worker  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29*cf84ac9aSAndroid Build Coastguard Worker  */
30*cf84ac9aSAndroid Build Coastguard Worker 
31*cf84ac9aSAndroid Build Coastguard Worker #include "tests.h"
32*cf84ac9aSAndroid Build Coastguard Worker #include <asm/unistd.h>
33*cf84ac9aSAndroid Build Coastguard Worker #include "scno.h"
34*cf84ac9aSAndroid Build Coastguard Worker 
35*cf84ac9aSAndroid Build Coastguard Worker #if defined __NR_preadv2 && defined __NR_pwritev2
36*cf84ac9aSAndroid Build Coastguard Worker 
37*cf84ac9aSAndroid Build Coastguard Worker # include <errno.h>
38*cf84ac9aSAndroid Build Coastguard Worker # include <fcntl.h>
39*cf84ac9aSAndroid Build Coastguard Worker # include <stdio.h>
40*cf84ac9aSAndroid Build Coastguard Worker # include <sys/uio.h>
41*cf84ac9aSAndroid Build Coastguard Worker # include <unistd.h>
42*cf84ac9aSAndroid Build Coastguard Worker 
43*cf84ac9aSAndroid Build Coastguard Worker static int
pr(const int fd,const struct iovec * const vec,const unsigned long vlen,const unsigned long pos)44*cf84ac9aSAndroid Build Coastguard Worker pr(const int fd, const struct iovec *const vec,
45*cf84ac9aSAndroid Build Coastguard Worker    const unsigned long vlen, const unsigned long pos)
46*cf84ac9aSAndroid Build Coastguard Worker {
47*cf84ac9aSAndroid Build Coastguard Worker 	return syscall(__NR_preadv2, fd, vec, vlen, pos, 0L, 0L);
48*cf84ac9aSAndroid Build Coastguard Worker }
49*cf84ac9aSAndroid Build Coastguard Worker 
50*cf84ac9aSAndroid Build Coastguard Worker static int
pw(const int fd,const struct iovec * const vec,const unsigned long vlen,const unsigned long pos)51*cf84ac9aSAndroid Build Coastguard Worker pw(const int fd, const struct iovec *const vec,
52*cf84ac9aSAndroid Build Coastguard Worker    const unsigned long vlen, const unsigned long pos)
53*cf84ac9aSAndroid Build Coastguard Worker {
54*cf84ac9aSAndroid Build Coastguard Worker 	return syscall(__NR_pwritev2, fd, vec, vlen, pos, 0L, 0L);
55*cf84ac9aSAndroid Build Coastguard Worker }
56*cf84ac9aSAndroid Build Coastguard Worker 
57*cf84ac9aSAndroid Build Coastguard Worker static void
dumpio(void)58*cf84ac9aSAndroid Build Coastguard Worker dumpio(void)
59*cf84ac9aSAndroid Build Coastguard Worker {
60*cf84ac9aSAndroid Build Coastguard Worker 	static char tmp[] = "preadv2-pwritev2-tmpfile";
61*cf84ac9aSAndroid Build Coastguard Worker 	if (open(tmp, O_CREAT|O_RDONLY|O_TRUNC, 0600) != 0)
62*cf84ac9aSAndroid Build Coastguard Worker 		perror_msg_and_fail("creat: %s", tmp);
63*cf84ac9aSAndroid Build Coastguard Worker 	if (open(tmp, O_WRONLY) != 1)
64*cf84ac9aSAndroid Build Coastguard Worker 		perror_msg_and_fail("open: %s", tmp);
65*cf84ac9aSAndroid Build Coastguard Worker 	if (unlink(tmp))
66*cf84ac9aSAndroid Build Coastguard Worker 		perror_msg_and_fail("unlink: %s", tmp);
67*cf84ac9aSAndroid Build Coastguard Worker 
68*cf84ac9aSAndroid Build Coastguard Worker 	static const char w0_c[] = "012";
69*cf84ac9aSAndroid Build Coastguard Worker 	const char *w0_d = hexdump_strdup(w0_c);
70*cf84ac9aSAndroid Build Coastguard Worker 	void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c));
71*cf84ac9aSAndroid Build Coastguard Worker 
72*cf84ac9aSAndroid Build Coastguard Worker 	static const char w1_c[] = "34567";
73*cf84ac9aSAndroid Build Coastguard Worker 	const char *w1_d = hexdump_strdup(w1_c);
74*cf84ac9aSAndroid Build Coastguard Worker 	void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c));
75*cf84ac9aSAndroid Build Coastguard Worker 
76*cf84ac9aSAndroid Build Coastguard Worker 	static const char w2_c[] = "89abcde";
77*cf84ac9aSAndroid Build Coastguard Worker 	const char *w2_d = hexdump_strdup(w2_c);
78*cf84ac9aSAndroid Build Coastguard Worker 	void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c));
79*cf84ac9aSAndroid Build Coastguard Worker 
80*cf84ac9aSAndroid Build Coastguard Worker 	long rc;
81*cf84ac9aSAndroid Build Coastguard Worker 
82*cf84ac9aSAndroid Build Coastguard Worker 	static const char r0_c[] = "01234567";
83*cf84ac9aSAndroid Build Coastguard Worker 	const char *r0_d = hexdump_strdup(r0_c);
84*cf84ac9aSAndroid Build Coastguard Worker 	static const char r1_c[] = "89abcde";
85*cf84ac9aSAndroid Build Coastguard Worker 	const char *r1_d = hexdump_strdup(r1_c);
86*cf84ac9aSAndroid Build Coastguard Worker 
87*cf84ac9aSAndroid Build Coastguard Worker 	const struct iovec w_iov_[] = {
88*cf84ac9aSAndroid Build Coastguard Worker 		{
89*cf84ac9aSAndroid Build Coastguard Worker 			.iov_base = w0,
90*cf84ac9aSAndroid Build Coastguard Worker 			.iov_len = LENGTH_OF(w0_c)
91*cf84ac9aSAndroid Build Coastguard Worker 		}, {
92*cf84ac9aSAndroid Build Coastguard Worker 			.iov_base = w1,
93*cf84ac9aSAndroid Build Coastguard Worker 			.iov_len = LENGTH_OF(w1_c)
94*cf84ac9aSAndroid Build Coastguard Worker 		}, {
95*cf84ac9aSAndroid Build Coastguard Worker 			.iov_base = w2,
96*cf84ac9aSAndroid Build Coastguard Worker 			.iov_len = LENGTH_OF(w2_c)
97*cf84ac9aSAndroid Build Coastguard Worker 		}
98*cf84ac9aSAndroid Build Coastguard Worker 	};
99*cf84ac9aSAndroid Build Coastguard Worker 	const struct iovec *w_iov = tail_memdup(w_iov_, sizeof(w_iov_));
100*cf84ac9aSAndroid Build Coastguard Worker 
101*cf84ac9aSAndroid Build Coastguard Worker 	rc = pw(1, w_iov, 0, 0);
102*cf84ac9aSAndroid Build Coastguard Worker 	if (rc)
103*cf84ac9aSAndroid Build Coastguard Worker 		perror_msg_and_fail("pwritev2: expected 0, returned %ld", rc);
104*cf84ac9aSAndroid Build Coastguard Worker 	tprintf("pwritev2(1, [], 0, 0, 0) = 0\n");
105*cf84ac9aSAndroid Build Coastguard Worker 
106*cf84ac9aSAndroid Build Coastguard Worker 	rc = pw(1, w_iov + ARRAY_SIZE(w_iov_) - 1, 2, 0);
107*cf84ac9aSAndroid Build Coastguard Worker 	tprintf("pwritev2(1, [{iov_base=\"%s\", iov_len=%u}, ... /* %p */], 2, 0, 0)"
108*cf84ac9aSAndroid Build Coastguard Worker 		" = %ld %s (%m)\n",
109*cf84ac9aSAndroid Build Coastguard Worker 		w2_c, LENGTH_OF(w2_c), w_iov + ARRAY_SIZE(w_iov_),
110*cf84ac9aSAndroid Build Coastguard Worker 		rc, errno2name());
111*cf84ac9aSAndroid Build Coastguard Worker 
112*cf84ac9aSAndroid Build Coastguard Worker 	const unsigned int w_len =
113*cf84ac9aSAndroid Build Coastguard Worker 		LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c);
114*cf84ac9aSAndroid Build Coastguard Worker 
115*cf84ac9aSAndroid Build Coastguard Worker 	rc = pw(1, w_iov, ARRAY_SIZE(w_iov_), 0);
116*cf84ac9aSAndroid Build Coastguard Worker 	if (rc != (int) w_len)
117*cf84ac9aSAndroid Build Coastguard Worker 		perror_msg_and_fail("pwritev2: expected %u, returned %ld",
118*cf84ac9aSAndroid Build Coastguard Worker 				    w_len, rc);
119*cf84ac9aSAndroid Build Coastguard Worker 	close(1);
120*cf84ac9aSAndroid Build Coastguard Worker 	tprintf("pwritev2(1, [{iov_base=\"%s\", iov_len=%u}"
121*cf84ac9aSAndroid Build Coastguard Worker 		", {iov_base=\"%s\", iov_len=%u}"
122*cf84ac9aSAndroid Build Coastguard Worker 		", {iov_base=\"%s\", iov_len=%u}], %u, 0, 0) = %u\n"
123*cf84ac9aSAndroid Build Coastguard Worker 		" * %u bytes in buffer 0\n"
124*cf84ac9aSAndroid Build Coastguard Worker 		" | 00000 %-49s  %-16s |\n"
125*cf84ac9aSAndroid Build Coastguard Worker 		" * %u bytes in buffer 1\n"
126*cf84ac9aSAndroid Build Coastguard Worker 		" | 00000 %-49s  %-16s |\n"
127*cf84ac9aSAndroid Build Coastguard Worker 		" * %u bytes in buffer 2\n"
128*cf84ac9aSAndroid Build Coastguard Worker 		" | 00000 %-49s  %-16s |\n",
129*cf84ac9aSAndroid Build Coastguard Worker 		w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c),
130*cf84ac9aSAndroid Build Coastguard Worker 		w2_c, LENGTH_OF(w2_c), (unsigned int) ARRAY_SIZE(w_iov_), w_len,
131*cf84ac9aSAndroid Build Coastguard Worker 		LENGTH_OF(w0_c), w0_d, w0_c,
132*cf84ac9aSAndroid Build Coastguard Worker 		LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c);
133*cf84ac9aSAndroid Build Coastguard Worker 
134*cf84ac9aSAndroid Build Coastguard Worker 	const unsigned int r_len = (w_len + 1) / 2;
135*cf84ac9aSAndroid Build Coastguard Worker 	void *r0 = tail_alloc(r_len);
136*cf84ac9aSAndroid Build Coastguard Worker 	const struct iovec r0_iov_[] = {
137*cf84ac9aSAndroid Build Coastguard Worker 		{
138*cf84ac9aSAndroid Build Coastguard Worker 			.iov_base = r0,
139*cf84ac9aSAndroid Build Coastguard Worker 			.iov_len = r_len
140*cf84ac9aSAndroid Build Coastguard Worker 		}
141*cf84ac9aSAndroid Build Coastguard Worker 	};
142*cf84ac9aSAndroid Build Coastguard Worker 	const struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_));
143*cf84ac9aSAndroid Build Coastguard Worker 
144*cf84ac9aSAndroid Build Coastguard Worker 	rc = pr(0, r_iov, ARRAY_SIZE(r0_iov_), 0);
145*cf84ac9aSAndroid Build Coastguard Worker 	if (rc != (int) r_len)
146*cf84ac9aSAndroid Build Coastguard Worker 		perror_msg_and_fail("preadv2: expected %u, returned %ld",
147*cf84ac9aSAndroid Build Coastguard Worker 				    r_len, rc);
148*cf84ac9aSAndroid Build Coastguard Worker 	tprintf("preadv2(0, [{iov_base=\"%s\", iov_len=%u}], %u, 0, 0) = %u\n"
149*cf84ac9aSAndroid Build Coastguard Worker 		" * %u bytes in buffer 0\n"
150*cf84ac9aSAndroid Build Coastguard Worker 		" | 00000 %-49s  %-16s |\n",
151*cf84ac9aSAndroid Build Coastguard Worker 		r0_c, r_len, (unsigned int) ARRAY_SIZE(r0_iov_),
152*cf84ac9aSAndroid Build Coastguard Worker 		r_len, r_len, r0_d, r0_c);
153*cf84ac9aSAndroid Build Coastguard Worker 
154*cf84ac9aSAndroid Build Coastguard Worker 	void *r1 = tail_alloc(r_len);
155*cf84ac9aSAndroid Build Coastguard Worker 	void *r2 = tail_alloc(w_len);
156*cf84ac9aSAndroid Build Coastguard Worker 	const struct iovec r1_iov_[] = {
157*cf84ac9aSAndroid Build Coastguard Worker 		{
158*cf84ac9aSAndroid Build Coastguard Worker 			.iov_base = r1,
159*cf84ac9aSAndroid Build Coastguard Worker 			.iov_len = r_len
160*cf84ac9aSAndroid Build Coastguard Worker 		},
161*cf84ac9aSAndroid Build Coastguard Worker 		{
162*cf84ac9aSAndroid Build Coastguard Worker 			.iov_base = r2,
163*cf84ac9aSAndroid Build Coastguard Worker 			.iov_len = w_len
164*cf84ac9aSAndroid Build Coastguard Worker 		}
165*cf84ac9aSAndroid Build Coastguard Worker 	};
166*cf84ac9aSAndroid Build Coastguard Worker 	r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_));
167*cf84ac9aSAndroid Build Coastguard Worker 
168*cf84ac9aSAndroid Build Coastguard Worker 	rc = pr(0, r_iov, ARRAY_SIZE(r1_iov_), r_len);
169*cf84ac9aSAndroid Build Coastguard Worker 	if (rc != (int) w_len - (int) r_len)
170*cf84ac9aSAndroid Build Coastguard Worker 		perror_msg_and_fail("preadv2: expected %d, returned %ld",
171*cf84ac9aSAndroid Build Coastguard Worker 				    (int) w_len - r_len, rc);
172*cf84ac9aSAndroid Build Coastguard Worker 	tprintf("preadv2(0, [{iov_base=\"%s\", iov_len=%u}"
173*cf84ac9aSAndroid Build Coastguard Worker 		", {iov_base=\"\", iov_len=%u}], %u, %u, 0) = %u\n"
174*cf84ac9aSAndroid Build Coastguard Worker 		" * %u bytes in buffer 0\n"
175*cf84ac9aSAndroid Build Coastguard Worker 		" | 00000 %-49s  %-16s |\n",
176*cf84ac9aSAndroid Build Coastguard Worker 		r1_c, r_len, w_len, (unsigned int) ARRAY_SIZE(r1_iov_),
177*cf84ac9aSAndroid Build Coastguard Worker 		r_len, w_len - r_len,
178*cf84ac9aSAndroid Build Coastguard Worker 		w_len - r_len, r1_d, r1_c);
179*cf84ac9aSAndroid Build Coastguard Worker 	close(0);
180*cf84ac9aSAndroid Build Coastguard Worker }
181*cf84ac9aSAndroid Build Coastguard Worker 
182*cf84ac9aSAndroid Build Coastguard Worker int
main(void)183*cf84ac9aSAndroid Build Coastguard Worker main(void)
184*cf84ac9aSAndroid Build Coastguard Worker {
185*cf84ac9aSAndroid Build Coastguard Worker 	const kernel_ulong_t vlen = (kernel_ulong_t) 0xfac1fed2dad3bef4ULL;
186*cf84ac9aSAndroid Build Coastguard Worker 	const unsigned long long pos = 0x7ac5fed6dad7bef8;
187*cf84ac9aSAndroid Build Coastguard Worker 	const kernel_ulong_t pos_l = (kernel_ulong_t) pos;
188*cf84ac9aSAndroid Build Coastguard Worker 	long rc;
189*cf84ac9aSAndroid Build Coastguard Worker 	int test_dumpio;
190*cf84ac9aSAndroid Build Coastguard Worker 
191*cf84ac9aSAndroid Build Coastguard Worker 	tprintf("%s", "");
192*cf84ac9aSAndroid Build Coastguard Worker 
193*cf84ac9aSAndroid Build Coastguard Worker #if defined __x86_64__ && defined __ILP32__
194*cf84ac9aSAndroid Build Coastguard Worker 	/*
195*cf84ac9aSAndroid Build Coastguard Worker 	 * x32 is the only architecture where preadv2 takes 5 arguments,
196*cf84ac9aSAndroid Build Coastguard Worker 	 * see preadv64v2 in kernel sources.
197*cf84ac9aSAndroid Build Coastguard Worker 	 */
198*cf84ac9aSAndroid Build Coastguard Worker 	rc = syscall(__NR_preadv2, -1, NULL, vlen, pos_l, 1);
199*cf84ac9aSAndroid Build Coastguard Worker #else
200*cf84ac9aSAndroid Build Coastguard Worker 	const kernel_ulong_t pos_h =
201*cf84ac9aSAndroid Build Coastguard Worker 		(sizeof(pos_l) == sizeof(pos)) ?
202*cf84ac9aSAndroid Build Coastguard Worker 		(kernel_ulong_t) 0xbadc0deddeadbeefULL :
203*cf84ac9aSAndroid Build Coastguard Worker 		(kernel_ulong_t) (pos >> 32);
204*cf84ac9aSAndroid Build Coastguard Worker 	rc = syscall(__NR_preadv2, -1, NULL, vlen, pos_l, pos_h, 1);
205*cf84ac9aSAndroid Build Coastguard Worker #endif
206*cf84ac9aSAndroid Build Coastguard Worker 	if (rc != -1 || (ENOSYS != errno && EBADF != errno))
207*cf84ac9aSAndroid Build Coastguard Worker 		perror_msg_and_fail("preadv2");
208*cf84ac9aSAndroid Build Coastguard Worker 	test_dumpio = EBADF == errno;
209*cf84ac9aSAndroid Build Coastguard Worker 	tprintf("preadv2(-1, NULL, %lu, %lld, RWF_HIPRI) = %s\n",
210*cf84ac9aSAndroid Build Coastguard Worker 		(unsigned long) vlen, pos, sprintrc(rc));
211*cf84ac9aSAndroid Build Coastguard Worker 
212*cf84ac9aSAndroid Build Coastguard Worker #if defined __x86_64__ && defined __ILP32__
213*cf84ac9aSAndroid Build Coastguard Worker 	/*
214*cf84ac9aSAndroid Build Coastguard Worker 	 * x32 is the only architecture where pwritev2 takes 5 arguments,
215*cf84ac9aSAndroid Build Coastguard Worker 	 * see pwritev64v2 in kernel sources.
216*cf84ac9aSAndroid Build Coastguard Worker 	 */
217*cf84ac9aSAndroid Build Coastguard Worker 	rc = syscall(__NR_pwritev2, -1, NULL, vlen, pos_l, 1);
218*cf84ac9aSAndroid Build Coastguard Worker #else
219*cf84ac9aSAndroid Build Coastguard Worker 	rc = syscall(__NR_pwritev2, -1, NULL, vlen, pos_l, pos_h, 1);
220*cf84ac9aSAndroid Build Coastguard Worker #endif
221*cf84ac9aSAndroid Build Coastguard Worker 	if (rc != -1 || (ENOSYS != errno && EBADF != errno))
222*cf84ac9aSAndroid Build Coastguard Worker 		perror_msg_and_fail("pwritev2");
223*cf84ac9aSAndroid Build Coastguard Worker 	tprintf("pwritev2(-1, NULL, %lu, %lld, RWF_HIPRI) = %s\n",
224*cf84ac9aSAndroid Build Coastguard Worker 		(unsigned long) vlen, pos, sprintrc(rc));
225*cf84ac9aSAndroid Build Coastguard Worker 
226*cf84ac9aSAndroid Build Coastguard Worker 	if (test_dumpio)
227*cf84ac9aSAndroid Build Coastguard Worker 		dumpio();
228*cf84ac9aSAndroid Build Coastguard Worker 
229*cf84ac9aSAndroid Build Coastguard Worker 	tprintf("%s\n", "+++ exited with 0 +++");
230*cf84ac9aSAndroid Build Coastguard Worker 	return 0;
231*cf84ac9aSAndroid Build Coastguard Worker }
232*cf84ac9aSAndroid Build Coastguard Worker 
233*cf84ac9aSAndroid Build Coastguard Worker #else
234*cf84ac9aSAndroid Build Coastguard Worker 
235*cf84ac9aSAndroid Build Coastguard Worker SKIP_MAIN_UNDEFINED("__NR_preadv2 && __NR_pwritev2")
236*cf84ac9aSAndroid Build Coastguard Worker 
237*cf84ac9aSAndroid Build Coastguard Worker #endif
238