Changed the pointer to integer conversion so that it doesn't give compiler warnings
See if this resolves the linux compiler warning related to aliasing