ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Linux-Clone/Clone.xs
(Generate patch)

Comparing Linux-Clone/Clone.xs (file contents):
Revision 1.7 by root, Sat Sep 3 23:56:10 2022 UTC vs.
Revision 1.10 by root, Fri Jul 7 07:47:03 2023 UTC

15 15
16#include <sys/ioctl.h> 16#include <sys/ioctl.h>
17#include <net/if.h> 17#include <net/if.h>
18 18
19#include <linux/nsfs.h> 19#include <linux/nsfs.h>
20#include <linux/kcmp.h>
21
22/* kcmp.h does not define symbols, so there is no way to detect preesence of enum */
23/* members, so we just hardcode new symbols here. */
24#ifndef KCMP_EPOLL_TFD
25 #define KCMP_EPOLL_TFD 7
26#endif
20 27
21#ifdef __has_include 28#ifdef __has_include
22 #if !__has_include("linux/kcmp.h") // use "" as GCC wrongly expands macros 29 #if !__has_include("linux/kcmp.h") // use "" as GCC wrongly expands macros
23 #undef SYS_kcmp 30 #undef SYS_kcmp
24 #endif 31 #endif
116 const_iv_clone (NEWIPC) 123 const_iv_clone (NEWIPC)
117# endif 124# endif
118# ifdef CLONE_NEWNET 125# ifdef CLONE_NEWNET
119 const_iv_clone (NEWNET) 126 const_iv_clone (NEWNET)
120# endif 127# endif
128# ifdef CLONE_NEWTIME
129 const_iv_clone (NEWTIME)
130# endif
121# ifdef CLONE_PTRACE 131# ifdef CLONE_PTRACE
122 const_iv_clone (PTRACE) 132 const_iv_clone (PTRACE)
123# endif 133# endif
124# ifdef CLONE_VFORK 134# ifdef CLONE_VFORK
125 const_iv_clone (VFORK) 135 const_iv_clone (VFORK)
163 const_iv (KCMP_FILES) 173 const_iv (KCMP_FILES)
164 const_iv (KCMP_FS) 174 const_iv (KCMP_FS)
165 const_iv (KCMP_SIGHAND) 175 const_iv (KCMP_SIGHAND)
166 const_iv (KCMP_IO) 176 const_iv (KCMP_IO)
167 const_iv (KCMP_SYSVSEM) 177 const_iv (KCMP_SYSVSEM)
168 const_iv (KCMP_FILE) 178 const_iv (KCMP_EPOLL_TFD)
169# endif 179# endif
170# ifdef NS_GET_USERNS 180# ifdef NS_GET_USERNS
171 const_iv (NS_GET_USERNS) 181 const_iv (NS_GET_USERNS)
172# endif 182# endif
173# ifdef NS_GET_PARENT 183# ifdef NS_GET_PARENT
217} 227}
218 OUTPUT: RETVAL 228 OUTPUT: RETVAL
219 229
220int 230int
221unshare (int flags) 231unshare (int flags)
232 PROTOTYPE: @
222 233
223int 234int
224setns (SV *fh_or_fd, int nstype = 0) 235setns (SV *fh_or_fd, int nstype = 0)
225 C_ARGS: s_fileno (fh_or_fd, 0), nstype 236 C_ARGS: s_fileno (fh_or_fd, 0), nstype
226 237

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines