--- Linux-Clone/Clone.xs 2022/09/03 23:47:02 1.6 +++ Linux-Clone/Clone.xs 2022/09/04 00:17:26 1.8 @@ -16,6 +16,15 @@ #include #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 #undef SYS_kcmp @@ -116,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 @@ -163,7 +176,19 @@ 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) +# endif +# ifdef NS_GET_PARENT + const_iv (NS_GET_PARENT) +# endif +# ifdef NS_GET_NSTYPE + const_iv (NS_GET_NSTYPE) +# endif +# ifdef NS_OWNER_UID + const_iv (NS_OWNER_UID # endif };