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 <matt@linuxbox.com>
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
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;
}