Patch1 is not necessary, issue was fixed upstream in a different way.
Patch0 is dropped, because upstream recommends usings a different function,
and I don't want to keep updating this local patch. If there are problems
cause by dropping this patch, we can either fix the users or restore it.