Hi!
> diff --git a/testcases/kernel/containers/userns/userns_helper.h 
> b/testcases/kernel/containers/userns/userns_helper.h
> index da03bae..21e5cb8 100644
> --- a/testcases/kernel/containers/userns/userns_helper.h
> +++ b/testcases/kernel/containers/userns/userns_helper.h
> @@ -15,6 +15,16 @@
>  #include "test.h"
>  #include "safe_macros.h"
>  
> +/*
> + * Use raw setns syscall for versions of glibc that don't include it
> + */
> +#if __GLIBC__ <= 2 && __GLIBC_MINOR__ < 14
> +int setns(int fd, int nstype)
> +{
> +     return ltp_syscall(__NR_setns, fd, nstype);
> +}
> +#endif

I would rather see this as configure check. Simple
AC_CHECK_FUNCS([setns]) would do, then we can use #ifndef HAVE_SETNS in
the source after we include config.h.

-- 
Cyril Hrubis
chru...@suse.cz

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to