svn commit: r296861 - in head/sys: arm/arm powerpc/powerpc
Bjoern A. Zeeb
bz at FreeBSD.org
Mon Mar 14 14:55:17 UTC 2016
Author: bz
Date: Mon Mar 14 14:55:15 2016
New Revision: 296861
URL: https://svnweb.freebsd.org/changeset/base/296861
Log:
Only check for SYS_freebsd6_lseek if the syscall code is defined.
Whether this is the right or best solution is unclear but it fixes the
build for now.
Modified:
head/sys/arm/arm/vm_machdep.c
head/sys/powerpc/powerpc/exec_machdep.c
Modified: head/sys/arm/arm/vm_machdep.c
==============================================================================
--- head/sys/arm/arm/vm_machdep.c Mon Mar 14 14:15:26 2016 (r296860)
+++ head/sys/arm/arm/vm_machdep.c Mon Mar 14 14:55:15 2016 (r296861)
@@ -40,6 +40,8 @@
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
*/
+#include "opt_compat.h"
+
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -180,7 +182,7 @@ cpu_set_syscall_retval(struct thread *td
/*
* __syscall returns an off_t while most other syscalls return an
* int. As an off_t is 64-bits and an int is 32-bits we need to
- * place the returned data into r1. As the lseek and frerebsd6_lseek
+ * place the returned data into r1. As the lseek and freebsd6_lseek
* syscalls also return an off_t they do not need this fixup.
*/
call = frame->tf_r7;
@@ -189,8 +191,11 @@ cpu_set_syscall_retval(struct thread *td
register_t code = ap[_QUAD_LOWWORD];
if (td->td_proc->p_sysent->sv_mask)
code &= td->td_proc->p_sysent->sv_mask;
- fixup = (code != SYS_freebsd6_lseek && code != SYS_lseek)
- ? 1 : 0;
+ fixup = (
+#if defined(COMPAT_FREEBSD6) && defined(SYS_freebsd6_lseek)
+ code != SYS_freebsd6_lseek &&
+#endif
+ code != SYS_lseek) ? 1 : 0;
}
#endif
Modified: head/sys/powerpc/powerpc/exec_machdep.c
==============================================================================
--- head/sys/powerpc/powerpc/exec_machdep.c Mon Mar 14 14:15:26 2016 (r296860)
+++ head/sys/powerpc/powerpc/exec_machdep.c Mon Mar 14 14:55:15 2016 (r296861)
@@ -879,8 +879,11 @@ cpu_set_syscall_retval(struct thread *td
int code = tf->fixreg[FIRSTARG + 1];
if (p->p_sysent->sv_mask)
code &= p->p_sysent->sv_mask;
- fixup = (code != SYS_freebsd6_lseek && code != SYS_lseek) ?
- 1 : 0;
+ fixup = (
+#if defined(COMPAT_FREEBSD6) && defined(SYS_freebsd6_lseek)
+ code != SYS_freebsd6_lseek &&
+#endif
+ code != SYS_lseek) ? 1 : 0;
} else
fixup = 0;
More information about the svn-src-all
mailing list