Its (bogus) declaration in xenbus_dev.c was inconsistent with the
actual implementation, leaving room for stack corruption on 64-bit
systems. Thus move the declaration to a header included by both
parties, and use proper types for the parameters.
Additionally, the function is needed on privileged kernels only, and
hence neither the potentially forward-incompatible HAVE_UNLOCKED_IOCTL
conditionals in xenbus_dev.c are needed, nor does the function (and
its helper) need to be compiled in unprivileged builds.