1f08c3bdfSopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 2f08c3bdfSopenharmony_ci/* 3f08c3bdfSopenharmony_ci * Copyright (c) International Business Machines Corp., 2007 4f08c3bdfSopenharmony_ci * Copyright (c) 2014 Cyril Hrubis <chrubis@suse.cz> 5f08c3bdfSopenharmony_ci */ 6f08c3bdfSopenharmony_ci 7f08c3bdfSopenharmony_ci#ifndef LAPI_VMSPLICE_H__ 8f08c3bdfSopenharmony_ci#define LAPI_VMSPLICE_H__ 9f08c3bdfSopenharmony_ci 10f08c3bdfSopenharmony_ci#include "config.h" 11f08c3bdfSopenharmony_ci#include "lapi/syscalls.h" 12f08c3bdfSopenharmony_ci 13f08c3bdfSopenharmony_ci#include "lapi/iovec.h" 14f08c3bdfSopenharmony_ci 15f08c3bdfSopenharmony_ci#if !defined(HAVE_VMSPLICE) 16f08c3bdfSopenharmony_cistatic inline ssize_t vmsplice(int fd, const struct iovec *iov, 17f08c3bdfSopenharmony_ci unsigned long nr_segs, unsigned int flags) 18f08c3bdfSopenharmony_ci{ 19f08c3bdfSopenharmony_ci return tst_syscall(__NR_vmsplice, fd, iov, nr_segs, flags); 20f08c3bdfSopenharmony_ci} 21f08c3bdfSopenharmony_ci#endif 22f08c3bdfSopenharmony_ci 23f08c3bdfSopenharmony_ci#endif /* LAPI_VMSPLICE_H__ */ 24