add patch form upstream netbsd