xref: /aosp_15_r20/external/ltp/include/lapi/execveat.h (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1*49cdfc7eSAndroid Build Coastguard Worker // SPDX-License-Identifier: GPL-2.0-or-later
2*49cdfc7eSAndroid Build Coastguard Worker /*
3*49cdfc7eSAndroid Build Coastguard Worker  * Copyright (C) 2018 MediaTek Inc.  All Rights Reserved.
4*49cdfc7eSAndroid Build Coastguard Worker  */
5*49cdfc7eSAndroid Build Coastguard Worker 
6*49cdfc7eSAndroid Build Coastguard Worker #ifndef LAPI_EXECVEAT_H__
7*49cdfc7eSAndroid Build Coastguard Worker #define LAPI_EXECVEAT_H__
8*49cdfc7eSAndroid Build Coastguard Worker 
9*49cdfc7eSAndroid Build Coastguard Worker #include <sys/types.h>
10*49cdfc7eSAndroid Build Coastguard Worker #include "config.h"
11*49cdfc7eSAndroid Build Coastguard Worker #include "lapi/syscalls.h"
12*49cdfc7eSAndroid Build Coastguard Worker 
13*49cdfc7eSAndroid Build Coastguard Worker #if !defined(HAVE_EXECVEAT)
execveat(int dirfd,const char * pathname,char * const argv[],char * const envp[],int flags)14*49cdfc7eSAndroid Build Coastguard Worker static inline int execveat(int dirfd, const char *pathname,
15*49cdfc7eSAndroid Build Coastguard Worker 			   char *const argv[], char *const envp[],
16*49cdfc7eSAndroid Build Coastguard Worker 			   int flags)
17*49cdfc7eSAndroid Build Coastguard Worker {
18*49cdfc7eSAndroid Build Coastguard Worker 	return tst_syscall(__NR_execveat, dirfd, pathname, argv, envp, flags);
19*49cdfc7eSAndroid Build Coastguard Worker }
20*49cdfc7eSAndroid Build Coastguard Worker #endif
21*49cdfc7eSAndroid Build Coastguard Worker 
22*49cdfc7eSAndroid Build Coastguard Worker #endif /* LAPI_EXECVEAT_H__ */
23