xref: /linux/tools/build/feature/test-scandirat.c (revision 1ac731c529cd4d6adbce134754b51ff7d822b145)
1 // SPDX-License-Identifier: GPL-2.0
2 #ifndef _GNU_SOURCE
3 #define _GNU_SOURCE
4 #endif
5 #include <dirent.h>
6 
main(void)7 int main(void)
8 {
9 	// expects non-NULL, arg3 is 'restrict' so "pointers" have to be different
10 	return scandirat(/*dirfd=*/ 0, /*dirp=*/ (void *)1, /*namelist=*/ (void *)2, /*filter=*/ (void *)3, /*compar=*/ (void *)4);
11 }
12 
13 #undef _GNU_SOURCE
14