skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

commit 83531cd3f60289e9be86342ef63a40ac2e1b3bc9
parent 3afaaa1e4a76d38dc90d9860b42e132342568d6e
Author: Laurent Bercot <ska-skaware@skarnet.org>
Date:   Mon, 28 Aug 2017 08:00:43 +0000

 Add nsgetparent sysdep

Diffstat:
Mconfigure | 1+
Asrc/sysdeps/trynsgetparent.c | 12++++++++++++
2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/configure b/configure @@ -514,6 +514,7 @@ EOF choose clr getrandom GETRANDOM 'getrandom()' choose cl itimer ITIMER 'setitimer()' choose cl namespaces NAMESPACES 'namespaces' + choose cl nsgetparent NSGETPARENT 'NS_GET_PARENT' echo '#endif' >> $sysdeps/sysdeps.h fi diff --git a/src/sysdeps/trynsgetparent.c b/src/sysdeps/trynsgetparent.c @@ -0,0 +1,12 @@ +/* ISC license. */ + +#undef _POSIX_C_SOURCE +#undef _XOPEN_SOURCE + +#include <sys/ioctl.h> +#include <linux/nsfs.h> + +int main (void) +{ + return ioctl(0, NS_GET_PARENT) ; +}