Fix patch error when building outside rom

Signed-off-by: artas182x <artas182x@gmail.com>