xref: /aosp_15_r20/external/ltp/m4/ltp-fcntl.m4 (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1*49cdfc7eSAndroid Build Coastguard Workerdnl SPDX-License-Identifier: GPL-2.0-or-later
2*49cdfc7eSAndroid Build Coastguard Workerdnl Copyright (c) 2014 Fujitsu Ltd.
3*49cdfc7eSAndroid Build Coastguard Workerdnl Author: Xiaoguang Wang <[email protected]>
4*49cdfc7eSAndroid Build Coastguard Worker
5*49cdfc7eSAndroid Build Coastguard WorkerAC_DEFUN([LTP_CHECK_SYSCALL_FCNTL],[
6*49cdfc7eSAndroid Build Coastguard Worker	AC_MSG_CHECKING([for fcntl f_owner_ex])
7*49cdfc7eSAndroid Build Coastguard Worker	AC_COMPILE_IFELSE([AC_LANG_SOURCE([
8*49cdfc7eSAndroid Build Coastguard Worker#define _GNU_SOURCE
9*49cdfc7eSAndroid Build Coastguard Worker#include <fcntl.h>
10*49cdfc7eSAndroid Build Coastguard Workerint main(void) {
11*49cdfc7eSAndroid Build Coastguard Worker	struct f_owner_ex tst_own_ex;
12*49cdfc7eSAndroid Build Coastguard Worker	return 0;
13*49cdfc7eSAndroid Build Coastguard Worker}])],[has_f_owner_ex="yes"])
14*49cdfc7eSAndroid Build Coastguard Worker
15*49cdfc7eSAndroid Build Coastguard Workerif test "x$has_f_owner_ex" = xyes; then
16*49cdfc7eSAndroid Build Coastguard Worker	AC_DEFINE(HAVE_STRUCT_F_OWNER_EX,1,[Define to 1 if you have struct f_owner_ex])
17*49cdfc7eSAndroid Build Coastguard Worker	AC_MSG_RESULT(yes)
18*49cdfc7eSAndroid Build Coastguard Workerelse
19*49cdfc7eSAndroid Build Coastguard Worker	AC_MSG_RESULT(no)
20*49cdfc7eSAndroid Build Coastguard Workerfi
21*49cdfc7eSAndroid Build Coastguard Worker])
22