Updated patch to use sprintf and removed unwanted includes.