--- Linux-Clone/Clone.xs 2022/09/03 23:56:10 1.7 +++ Linux-Clone/Clone.xs 2022/09/06 10:57:01 1.9 @@ -17,6 +17,13 @@ #include #include +#include + +/* kcmp.h does not define symbols, so there is no way to detect preesence of enum */ +/* members, so we just hardcode new symbols here. */ +#ifndef KCMP_EPOLL_TFD + #define KCMP_EPOLL_TFD 7 +#endif #ifdef __has_include #if !__has_include("linux/kcmp.h") // use "" as GCC wrongly expands macros @@ -118,6 +125,10 @@ # ifdef CLONE_NEWNET const_iv_clone (NEWNET) # endif +# ifdef CLONE_NEWTIME + x + const_iv_clone (NEWTIME) +# endif # ifdef CLONE_PTRACE const_iv_clone (PTRACE) # endif @@ -165,7 +176,7 @@ const_iv (KCMP_SIGHAND) const_iv (KCMP_IO) const_iv (KCMP_SYSVSEM) - const_iv (KCMP_FILE) + const_iv (KCMP_EPOLL_TFD) # endif # ifdef NS_GET_USERNS const_iv (NS_GET_USERNS) @@ -219,6 +230,7 @@ int unshare (int flags) + PROTOTYPE: @ int setns (SV *fh_or_fd, int nstype = 0)