Add typecast to use void pointer as file

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>