[LTP] [PATCH v2] syscalls/execveat03: Fix compiler errors

Jan Stancek jstancek@redhat.com
Wed Aug 22 08:49:23 CEST 2018


----- Original Message -----
> According to open(2) and linkat(2) manpages, O_PATH and AT_EMPTY_PATH
> flags were added since kernel v2.6.39, so these undefined flags led
> to the following errors on older kernels(e.g. v2.6.32):
> ---------------------------------------------------------
> execveat03.c:66: error: ‘O_PATH’ undeclared (first use in this function)
> execveat03.c:69: error: ‘AT_EMPTY_PATH’ undeclared (first use in this
> function)
> ---------------------------------------------------------
> 
> 1) Add AT_EMPTY_PATH into lapi/fcntl.h
> 2) Include lapi/fcntl.h in execveat03.c
> 
> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>

Pushed.

We could add also minimum kernel version check, but since test
is using ltp_syscall(), it handles ENOSYS. I'll leave it as it
is for now.

Thanks,
Jan


More information about the ltp mailing list