ports/emulators/qemu-devel/files/patch-z3-bsd-user-8fix
Juergen Lock 45aa9370f0 - Update net/usbredir to 0.6 .
- Update emulators/qemu-devel to 1.4.0 with preliminary bsd-user patches.

Thanx to:	sson, cognet, and others for much improved bsd-user support -
		it now runs at least quite a few mips64 and single-threaded
		arm binaries, see:

	https://wiki.freebsd.org/QemuUserModeHowTo
2013-03-29 17:40:38 +00:00

61 lines
1.4 KiB
Text

--- a/bsd-user/syscall.c
+++ b/bsd-user/syscall.c
@@ -17,6 +17,18 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+
+#if defined(__FreeBSD__)
+#include <sys/param.h>
+#endif
+
+#if defined(__FreeBSD_version) && __FreeBSD_version < 900000
+#define st_atim st_atimespec
+#define st_ctim st_ctimespec
+#define st_mtim st_mtimespec
+#define st_birthtim st_birthtimespec
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
@@ -1519,9 +1533,11 @@ do_setsockopt(int sockfd, int level, int
optname = SO_ERROR;
break;
+#ifdef SO_USER_COOKIE
case TARGET_SO_USER_COOKIE:
optname = SO_USER_COOKIE;
break;
+#endif
default:
goto unimplemented;
@@ -2091,9 +2107,11 @@ do_fork(CPUArchState *env, int num, int
ret = rfork(flags);
break;
+#if defined(__FreeBSD_version) && __FreeBSD_version > 900000
case TARGET_FREEBSD_NR_pdfork:
ret = pdfork(&fd, flags);
break;
+#endif
default:
ret = -TARGET_ENOSYS;
@@ -3499,6 +3517,7 @@ do_stat:
unlock_user(p, arg1, 0);
break;
+#if defined(__FreeBSD_version) && __FreeBSD_version > 900000
case TARGET_FREEBSD_NR_setloginclass:
if (!(p = lock_user_string(arg1)))
goto efault;
@@ -3512,6 +3531,7 @@ do_stat:
ret = get_errno(getloginclass(p, arg2));
unlock_user(p, arg1, 0);
break;
+#endif
case TARGET_FREEBSD_NR_getrusage:
{