This is identical to __sys_accept4(), except it takes a struct file instead of an fd, and it also allows passing in extra file->f_flags flags. The latter is done to support masking in O_NONBLOCK without manipulating the original file flags. No functional changes in this patch.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -392,6 +392,9 @@ extern int __sys_recvfrom(int fd, void __user *ubuf, size_t size, · 391 unmodified lines | ||
| 392 | 392 | extern int __sys_sendto(int fd, void __user *buff, size_t len, |
| 393 | 393 | unsigned int flags, struct sockaddr __user *addr, |
| 394 | 394 | int addr_len); |
| 395 | +extern int __sys_accept4_file(struct file *file, unsigned file_flags, | |
| 396 | + struct sockaddr __user *upeer_sockaddr, | |
| 397 | + int __user *upeer_addrlen, int flags); | |
| 395 | 398 | extern int __sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr, |
| 396 | 399 | int __user *upeer_addrlen, int flags); |
| 397 | 400 | extern int __sys_socket(int family, int type, int protocol); |