#define __NR_sys_syslog __NR_syslog
#define __NR_sys_tgkill __NR_tgkill
#define __NR_sys_tkill __NR_tkill
+#define __NR_sys_unlinkat __NR_unlinkat
#if defined(__alpha__) || defined (__ia64__) || defined(__x86_64__)
#define __NR__llseek __NR_lseek
#if defined(TARGET_NR_set_tid_address) && defined(__NR_set_tid_address)
_syscall1(int,set_tid_address,int *,tidptr)
#endif
+#if defined(TARGET_NR_unlinkat) && defined(__NR_unlinkat)
+_syscall3(int,sys_unlinkat,int,dirfd,const char *,pathname,int,flags)
+#endif
extern int personality(int);
extern int flock(int, int);
ret = get_errno(unlink(p));
unlock_user(p, arg1, 0);
break;
+#if defined(TARGET_NR_unlinkat) && defined(__NR_unlinkat)
+ case TARGET_NR_unlinkat:
+ if (!arg2) {
+ ret = -EFAULT;
+ goto fail;
+ }
+ p = lock_user_string(arg2);
+ if (!access_ok(VERIFY_READ, p, 1))
+ ret = -EFAULT;
+ else
+ ret = get_errno(sys_unlinkat(arg1, p, arg3));
+ if (p)
+ unlock_user(p, arg2, 0);
+ break;
+#endif
case TARGET_NR_execve:
{
char **argp, **envp;