[build] Fix int/gpointer type conversion