@@ -622,11 +622,6 @@ static inline abi_long do_freebsd_fcntl(abi_long arg1, abi_long arg2,
return ret;
}
-#if defined(__FreeBSD_version) && __FreeBSD_version >= 1300080
-extern int __realpathat(int fd, const char *path, char *buf, size_t size,
- int flags);
-/* https://svnweb.freebsd.org/base?view=revision&revision=358172 */
-/* no man page */
static inline abi_long do_freebsd_realpathat(abi_long arg1, abi_long arg2,
abi_long arg3, abi_long arg4, abi_long arg5)
{
@@ -640,12 +635,11 @@ static inline abi_long do_freebsd_realpathat(abi_long arg1, abi_long arg2,
return -TARGET_EFAULT;
}
- ret = get_errno(__realpathat(arg1, p, b, arg4, arg5));
+ ret = get_errno(syscall(SYS___realpathat, arg1, p, b, arg4, arg5));
UNLOCK_PATH(p, arg2);
unlock_user(b, arg3, ret);
return ret;
}
-#endif
#endif /* BSD_USER_FREEBSD_OS_STAT_H */
@@ -700,6 +700,57 @@ static abi_long freebsd_syscall(CPUArchState *env, int num, abi_long arg1,
ret = do_bsd_undelete(arg1);
break;
+ case TARGET_FREEBSD_NR_poll: /* poll(2) */
+ ret = do_bsd_poll(arg1, arg2, arg3);
+ break;
+
+ case TARGET_FREEBSD_NR_lseek: /* lseek(2) */
+ ret = do_bsd_lseek(env, arg1, arg2, arg3, arg4, arg5);
+ break;
+
+ case TARGET_FREEBSD_NR_freebsd10_pipe: /* pipe(2) */
+ ret = do_bsd_pipe(env, arg1);
+ break;
+
+ case TARGET_FREEBSD_NR_pipe2: /* pipe2(2) */
+ ret = do_bsd_pipe2(env, arg1, arg2);
+ break;
+
+ case TARGET_FREEBSD_NR_swapon: /* swapon(2) */
+ ret = do_bsd_swapon(arg1);
+ break;
+
+#if TARGET_FREEBSD_NR_freebsd13_swapoff
+ case TARGET_FREEBSD_NR_freebsd13_swapoff: /* freebsd13_swapoff(2) */
+ ret = do_freebsd13_swapoff(arg1);
+ break;
+#endif
+
+ case TARGET_FREEBSD_NR_swapoff: /* swapoff(2) */
+ ret = do_bsd_swapoff(arg1, arg2);
+ break;
+
+ case TARGET_FREEBSD_NR_chflagsat: /* chflagsat(2) */
+ ret = do_bsd_chflagsat(arg1, arg2, arg3, arg4);
+ break;
+
+ case TARGET_FREEBSD_NR_close_range: /* close_range(2) */
+ ret = do_freebsd_close_range(arg1, arg2, arg3);
+ break;
+
+ case TARGET_FREEBSD_NR___realpathat:
+ /* __realpathat(2) (XXX no realpathat()) */
+ ret = do_freebsd_realpathat(arg1, arg2, arg3, arg4, arg5);
+ break;
+
+ case TARGET_FREEBSD_NR_copy_file_range:
+ ret = do_freebsd_copy_file_range(arg1, arg2, arg3, arg4, arg5, arg6);
+ break;
+
+ case TARGET_FREEBSD_NR___specialfd:
+ ret = do_freebsd___specialfd(arg1, arg2, arg3);
+ break;
+
/*
* ioctl(2)
*/