Totally agree that this is not portable. Better to use patch, I think.