[LTP] [PATCH V2 27/32] sysconf01: Use _SC_2_C_VERSION conditionally

Cyril Hrubis chrubis@suse.cz
Tue Feb 2 18:14:58 CET 2016


Hi!
> diff --git a/testcases/kernel/syscalls/sysconf/sysconf01.c b/testcases/kernel/syscalls/sysconf/sysconf01.c
> index 8542e77..e806943 100644
> --- a/testcases/kernel/syscalls/sysconf/sysconf01.c
> +++ b/testcases/kernel/syscalls/sysconf/sysconf01.c
> @@ -102,7 +102,9 @@ int main(void)
>  	test_sysconf(_SC_ATEXIT_MAX);
>  	test_sysconf(_SC_2_C_BIND);
>  	test_sysconf(_SC_2_C_DEV);
> +#ifdef __GLIBC__

Why not #ifdef _SC_2_C_VERSION ?

That should work for any libc implementation...

>  	test_sysconf(_SC_2_C_VERSION);
> +#endif
>  	/* 21 - 25 */
>  	test_sysconf(_SC_2_CHAR_TERM);
>  	test_sysconf(_SC_2_FORT_DEV);

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the Ltp mailing list