aboutsummaryrefslogtreecommitdiffstats
path: root/module/os/freebsd
diff options
context:
space:
mode:
authorMartin Matuška <[email protected]>2023-04-06 19:35:02 +0200
committerGitHub <[email protected]>2023-04-06 10:35:02 -0700
commita3f82aec933660558d6512a83481527ef731ff0c (patch)
tree1d131a689adc233d7c3d20efdf32a0798475cba4 /module/os/freebsd
parentece7ab7e7de81a9a51923d7baa7db3577de4aace (diff)
Miscellaneous FreBSD compilation bugfixes
Add missing machine/md_var.h to spl/sys/simd_aarch64.h and spl/sys/simd_arm.h In spl/sys/simd_x86.h, PCB_FPUNOSAVE exists only on amd64, use PCB_NPXNOSAVE on i386 In FreeBSD sys/elf_common.h redefines AT_UID and AT_GID on FreeBSD, we need a hack in vnode.h similar to Linux. sys/simd.h needs to be included early. In zfs_freebsd_copy_file_range() we pass a (size_t *)lenp to zfs_clone_range() that expects a (uint64_t *) Allow compiling armv6 world by limiting ARM macros in sha256_impl.c and sha512_impl.c to __ARM_ARCH > 6 Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Tino Reichardt <[email protected]> Reviewed-by: Richard Yao <[email protected]> Reviewed-by: Pawel Jakub Dawidek <[email protected]> Reviewed-by: Signed-off-by: WHR <[email protected]> Signed-off-by: Martin Matuska <[email protected]> Closes #14674
Diffstat (limited to 'module/os/freebsd')
-rw-r--r--module/os/freebsd/zfs/zfs_vnops_os.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/module/os/freebsd/zfs/zfs_vnops_os.c b/module/os/freebsd/zfs/zfs_vnops_os.c
index 9169244b1..b3405b759 100644
--- a/module/os/freebsd/zfs/zfs_vnops_os.c
+++ b/module/os/freebsd/zfs/zfs_vnops_os.c
@@ -29,12 +29,12 @@
/* Portions Copyright 2007 Jeremy Teo */
/* Portions Copyright 2010 Robert Milkowski */
-
#include <sys/param.h>
#include <sys/time.h>
#include <sys/systm.h>
#include <sys/sysmacros.h>
#include <sys/resource.h>
+#include <security/mac/mac_framework.h>
#include <sys/vfs.h>
#include <sys/endian.h>
#include <sys/vm.h>
@@ -85,7 +85,6 @@
#include <sys/zfs_vnops.h>
#include <sys/module.h>
#include <sys/sysent.h>
-#include <security/mac/mac_framework.h>
#include <sys/dmu_impl.h>
#include <sys/brt.h>
#include <sys/zfeature.h>
@@ -6241,6 +6240,7 @@ zfs_freebsd_copy_file_range(struct vop_copy_file_range_args *ap)
struct mount *mp;
struct uio io;
int error;
+ uint64_t len = *ap->a_lenp;
/*
* TODO: If offset/length is not aligned to recordsize, use
@@ -6289,7 +6289,8 @@ zfs_freebsd_copy_file_range(struct vop_copy_file_range_args *ap)
goto unlock;
error = zfs_clone_range(VTOZ(invp), ap->a_inoffp, VTOZ(outvp),
- ap->a_outoffp, ap->a_lenp, ap->a_fsizetd->td_ucred);
+ ap->a_outoffp, &len, ap->a_fsizetd->td_ucred);
+ *ap->a_lenp = (size_t)len;
unlock:
if (invp != outvp)