function pointer cast for linux