1 diff -urpa elogind-235.3.orig/src/basic/missing_syscall.h elogind-235.3/src/basic/missing_syscall.h
2 --- elogind-235.3.orig/src/basic/missing_syscall.h 2018-03-09 06:57:50.000000000 +0000
3 +++ elogind-235.3/src/basic/missing_syscall.h 2018-04-14 18:13:21.667411504 +0000
8 -static inline int pivot_root(const char *new_root, const char *put_old) {
9 +static inline int missing_pivot_root(const char *new_root, const char *put_old) {
10 return syscall(SYS_pivot_root, new_root, put_old);
13 +# define pivot_root missing_pivot_root
17 @@ -63,7 +65,7 @@ static inline int pivot_root(const char
21 -static inline int memfd_create(const char *name, unsigned int flags) {
22 +static inline int missing_memfd_create(const char *name, unsigned int flags) {
23 # ifdef __NR_memfd_create
24 return syscall(__NR_memfd_create, name, flags);
26 @@ -71,6 +73,8 @@ static inline int memfd_create(const cha
31 +# define memfd_create missing_memfd_create
34 /* ======================================================================= */
35 @@ -110,7 +114,7 @@ static inline int memfd_create(const cha
39 -static inline int getrandom(void *buffer, size_t count, unsigned flags) {
40 +static inline int missing_getrandom(void *buffer, size_t count, unsigned flags) {
41 # ifdef __NR_getrandom
42 return syscall(__NR_getrandom, buffer, count, flags);
44 @@ -118,14 +122,18 @@ static inline int getrandom(void *buffer
49 +# define getrandom missing_getrandom
52 /* ======================================================================= */
55 -static inline pid_t gettid(void) {
56 +static inline pid_t missing_gettid(void) {
57 return (pid_t) syscall(SYS_gettid);
60 +# define gettid missing_gettid
63 /* ======================================================================= */
64 @@ -153,7 +161,7 @@ struct file_handle {
65 unsigned char f_handle[0];
68 -static inline int name_to_handle_at(int fd, const char *name, struct file_handle *handle, int *mnt_id, int flags) {
69 +static inline int missing_name_to_handle_at(int fd, const char *name, struct file_handle *handle, int *mnt_id, int flags) {
70 # ifdef __NR_name_to_handle_at
71 return syscall(__NR_name_to_handle_at, fd, name, handle, mnt_id, flags);
73 @@ -161,6 +169,8 @@ static inline int name_to_handle_at(int
78 +# define name_to_handle_at missing_name_to_handle_at
81 /* ======================================================================= */
82 @@ -178,7 +188,7 @@ static inline int name_to_handle_at(int
86 -static inline int setns(int fd, int nstype) {
87 +static inline int missing_setns(int fd, int nstype) {
89 return syscall(__NR_setns, fd, nstype);
91 @@ -186,6 +196,8 @@ static inline int setns(int fd, int nsty
96 +# define setns missing_setns
99 /* ======================================================================= */
100 @@ -231,7 +243,7 @@ static inline pid_t raw_getpid(void) {
104 -static inline int renameat2(int oldfd, const char *oldname, int newfd, const char *newname, unsigned flags) {
105 +static inline int missing_renameat2(int oldfd, const char *oldname, int newfd, const char *newname, unsigned flags) {
106 # ifdef __NR_renameat2
107 return syscall(__NR_renameat2, oldfd, oldname, newfd, newname, flags);
109 @@ -239,12 +251,14 @@ static inline int renameat2(int oldfd, c
114 +# define renameat2 missing_renameat2
117 /* ======================================================================= */
120 -static inline int kcmp(pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2) {
121 +static inline int missing_kcmp(pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2) {
123 return syscall(__NR_kcmp, pid1, pid2, type, idx1, idx2);
125 @@ -252,36 +266,45 @@ static inline int kcmp(pid_t pid1, pid_t
130 +# define kcmp missing_kcmp
134 /* ======================================================================= */
137 -static inline long keyctl(int cmd, unsigned long arg2, unsigned long arg3, unsigned long arg4,unsigned long arg5) {
138 +static inline long missing_keyctl(int cmd, unsigned long arg2, unsigned long arg3, unsigned long arg4,unsigned long arg5) {
140 return syscall(__NR_keyctl, cmd, arg2, arg3, arg4, arg5);
146 +# define keyctl missing_keyctl
149 -static inline key_serial_t add_key(const char *type, const char *description, const void *payload, size_t plen, key_serial_t ringid) {
150 +static inline key_serial_t missing_add_key(const char *type, const char *description, const void *payload, size_t plen, key_serial_t ringid) {
152 return syscall(__NR_add_key, type, description, payload, plen, ringid);
158 +# define add_key missing_add_key
161 -static inline key_serial_t request_key(const char *type, const char *description, const char * callout_info, key_serial_t destringid) {
162 +static inline key_serial_t missing_request_key(const char *type, const char *description, const char * callout_info, key_serial_t destringid) {
163 # ifdef __NR_request_key
164 return syscall(__NR_request_key, type, description, callout_info, destringid);
170 +# define request_key missing_request_key
174 @@ -308,10 +331,10 @@ static inline key_serial_t request_key(c
178 -static inline ssize_t copy_file_range(int fd_in, loff_t *off_in,
179 - int fd_out, loff_t *off_out,
181 - unsigned int flags) {
182 +static inline ssize_t missing_copy_file_range(int fd_in, loff_t *off_in,
183 + int fd_out, loff_t *off_out,
185 + unsigned int flags) {
186 # ifdef __NR_copy_file_range
187 return syscall(__NR_copy_file_range, fd_in, off_in, fd_out, off_out, len, flags);
189 @@ -319,6 +342,8 @@ static inline ssize_t copy_file_range(in
194 +# define copy_file_range missing_copy_file_range
198 @@ -340,7 +365,7 @@ static inline ssize_t copy_file_range(in
202 -static inline int bpf(int cmd, union bpf_attr *attr, size_t size) {
203 +static inline int missing_bpf(int cmd, union bpf_attr *attr, size_t size) {
205 return (int) syscall(__NR_bpf, cmd, attr, size);
207 @@ -349,4 +374,5 @@ static inline int bpf(int cmd, union bpf
211 +# define bpf missing_bpf