restore some patches that were still needed on sparc64