From e798bcaf97c3ad1b464e29482cb29074cbbf33d6 Mon Sep 17 00:00:00 2001 From: Ben Kaduk Date: Mon, 20 Jun 2011 22:35:08 -0400 Subject: [PATCH] FBSD: use better casts in vop_advlock In the bsd.kmod.mk world, the compiler bails when we cast a pointer directly to int. Cast through intptr_t as the supported mechanism. On amd64, this loses bits, but since this instance is just attempting to use the value as a unique handle, it is probably okay for now. However, it should be addressed more properly eventually, when this locking implementation sees wider use. Change-Id: I4fe8084c14a97dc4efc8d74e9971b1540c028e40 Reviewed-on: http://gerrit.openafs.org/5034 Reviewed-by: Matt Benjamin Reviewed-by: Garrett Wollman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/afs/FBSD/osi_vnodeops.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/afs/FBSD/osi_vnodeops.c b/src/afs/FBSD/osi_vnodeops.c index 5be9ad021..311b5a959 100644 --- a/src/afs/FBSD/osi_vnodeops.c +++ b/src/afs/FBSD/osi_vnodeops.c @@ -1590,7 +1590,10 @@ afs_vop_advlock(ap) AFS_GLOCK(); error = - afs_lockctl(VTOAFS(ap->a_vp), ap->a_fl, ap->a_op, &cr, (int)ap->a_id); + afs_lockctl(VTOAFS(ap->a_vp), + ap->a_fl, + ap->a_op, &cr, + (int)(intptr_t)ap->a_id); /* XXX: no longer unique! */ AFS_GUNLOCK(); return error; } -- 2.39.5