Try to cope better with void pointer to int usage cases.
Try to cope better with void pointer to int usage cases.

Use intptr_t for such cases.
More casts/types should be improved in this file.

Tested with syscall regression tests from IBM.

orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars