The kernel struct actually is defined as an int. That is the reason the first version didn't work on 32-bit machines - fiodgname_arg was 8 bytes vs 16 on 64-bit, and the size is encoded into the ioctl number.
I'm going to push an updated version which uses the _IOC macros instead of hardcoding the ioctl number.